#36552 [Bgs]: Setting multiple variables to "" with list results in " Invalid opcode 98/1/1"

From: Date: Tue, 28 Feb 2006 00:52:04 +0000
Subject: #36552 [Bgs]: Setting multiple variables to "" with list results in " Invalid opcode 98/1/1"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-93741@lists.php.net to get a copy of this message
ID: 36552 Updated by: bjori@php.net -Summary: bjori Reported By: stitched at mindspring dot com Status: Bogus Bug Type: Reproducible crash Operating System: Windows 2000 PHP Version: 5.1.2 New Comment: (don't know how I managed to change the summary..) Dave: No, It has never worked as you expected. list($foo, $bar) = ""; will (in 4.4.3-dev) set $foo and $bar to NULL, not empty string. - Hannes :) Previous Comments: ------------------------------------------------------------------------ [2006-02-28 01:04:48] stitched at mindspring dot com Very sorry for the bogus report then. FWIW 4.4.2 doesn't complain about that usage at all and it's been working fine for many 4.x versions. Dave ------------------------------------------------------------------------ [2006-02-28 00:39:04] bjori@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php php.net/list: "Note: list() only works on numerical arrays and assumes the numerical indices start at 0." use $var1 = $var2 = ""; ------------------------------------------------------------------------ [2006-02-27 22:11:27] stitched at mindspring dot com Description: ------------ Setting multiple variables to an empty string "" using list results in the error below and PHP terminates: Fatal error: Invalid opcode 98/1/1. in phpfail.php on line 1 I tested with the latest build available for Windows which is PHP 5.1.3-dev (cli) (built: Feb 20 2006 00:29:25). phpinfo reports that the build command was: cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" Reproduce code: --------------- <?php list($Var1,$Var2) = ""; ?> Expected result: ---------------- I expected both $Var1 and $Var2 to be set to an empty string. Setting them individually works as expected. Actual result: -------------- Fatal error: Invalid opcode 98/1/1. in phpfail.php on line 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36552&edit=1

« previous php.bugs (#93741) next »