PHP :: Bug #40591 :: list()="string"; gives invalid opcode

Bug #40591 list()="string"; gives invalid opcode
Submitted: 2007-02-22 15:13 UTC Modified: 2007-02-25 16:15 UTC
From: mike@php.net Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2007-02-22 (snap) OS:
Private report: No CVE-ID: None

 [2007-02-22 15:13 UTC] mike@php.net

Description:
------------
.

Reproduce code:
---------------
list($a,$b,$c)="abc";


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2007-02-25 16:15 UTC] dmitry@php.net

The bug is fixed in CVS HEAD and PHP_5_2.

But the behavoirs of the following scripts are still different:

1) list($a, $b) = "ab";          // $a = $b = NULL;
2) list($a, $b) = "a"."b";       // $a = $b = NULL;
3) $s = "ab"; list($a, $b) = $s; // $a = "a"; $b = "b";
4) list($a, $b) = foo();         // $a = "a"; $b = "b";