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

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC