php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62932 Not understandable Fatal error
Submitted: 2012-08-25 23:33 UTC Modified: 2012-08-26 04:03 UTC
From: bobwei9 at hotmail dot com Assigned: laruence (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: master-Git-2012-08-25 (Git) OS: Irrelevant (OS X 10.8)
Private report: No CVE-ID: None
 [2012-08-25 23:33 UTC] bobwei9 at hotmail dot com
Description:
------------
Using PHP, I never would understand this error message without knowing the opcodes by heart.... Please change the error message.

Test script:
---------------
php -r 'foreach ([[1]] as list($x) => list($y)) print "$x => $y\n";'


Expected result:
----------------
PHP Parse error: Cannot use T_LIST as index in foreach in Command line code on line 1

or something like this?

Actual result:
--------------
PHP Fatal error:  Invalid opcode 38/1/2. in Command line code on line 1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-25 23:36 UTC] felipe@php.net
I wonder that such syntax is not supposed to be allowed. See bug #62931.
 [2012-08-25 23:36 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: laruence
 [2012-08-26 04:03 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7c60aeef857f288661a6f95cf3aa45d6a6feff9b
Log: Fixed bug #62931 & #62932
 [2012-08-26 04:03 UTC] laruence@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-08-26 04:03 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 [2013-11-17 09:32 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7c60aeef857f288661a6f95cf3aa45d6a6feff9b
Log: Fixed bug #62931 & #62932
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 16:01:30 2024 UTC