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: Thu Nov 21 09:01:32 2024 UTC