php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16159 script termination without error on $arr[] $var
Submitted: 2002-03-18 22:24 UTC Modified: 2002-03-19 01:07 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: ketan at audiogalaxy dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.1.0 OS: linux
Private report: No CVE-ID: None
 [2002-03-18 22:24 UTC] ketan at audiogalaxy dot com
The php script below will terminate without printing out any sort of error indicating the problem.  There is no HTML output error, nor anything in the apache error log.

<?

echo "blah1";

$key = "k";
//  the line below is bad
$arr[] $key;
//  the line above is bad

echo "blah2";

?>


I have duplicated this failure with php 4.0.5 from the command line in the script:

#!/usr/local/bin/php -q

<?

echo "blah1\n";
$arr[]  =$key;
echo "blah2\n";

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-18 22:25 UTC] ketan at audiogalaxy dot com
The second script should be missing the '=' as in the first one.  What I meant is the following:


#!/usr/local/bin/php -q

<?

echo "blah1\n";
$arr[]  $key;
echo "blah2\n";

?>
 [2002-03-19 01:07 UTC] mfischer@php.net
error_reporting(E_ALL); is your friend.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 05:01:34 2025 UTC