php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
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
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2007-02-22 (snap) OS:
Private report: No CVE-ID:
 [2007-02-22 15:13 UTC] mike@php.net
Description:
------------
.

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


Patches

Add a Patch

Pull Requests

Add a Pull Request

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";

 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 25 07:02:14 2014 UTC