php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42233 [PATCH] Problems with ??? in extract()
Submitted: 2007-08-07 13:11 UTC Modified: 2007-08-10 12:16 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: hkb at hkb dot it Assigned: jani (profile)
Status: Closed Package: Variables related
PHP Version: 5.2.4RC1 OS: Windows 2003
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hkb at hkb dot it
New email:
PHP Version: OS:

 

 [2007-08-07 13:11 UTC] hkb at hkb dot it
Description:
------------
I Just updated PHP today from 5.2.0 to PHP 5.2.3 and found that extract() didnt work if the array containes the danish letters "?", "?" or "?"...

Try running the code below ant you will see that $? is empty when it should be "2"...

I hope you will fix this bug for your next release...

Reproduce code:
---------------
$test[0] = array("e" => "2", "?" => "2");

print_r($test[0]);

extract($test[0]);


echo "<br /><br />".$e." - ".$test[0]['e'];
echo "<br /><br />".$?." - ".$test[0]['?'];

Expected result:
----------------
Array ( [e] => 2 [?] => 2 )

2 - 2

2 - 2

Actual result:
--------------
Array ( [e] => 2 [?] => 2 )

2 - 2

- 2

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-07 14:57 UTC] jani@php.net
This happens because extract() uses isalpha() for checking the validity of variable name. Fix brewing..
 [2007-08-08 08:04 UTC] jani@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2007-08-10 12:16 UTC] jani@php.net
And fix fixed now too. (some extract() tests failed due to bad logic in my earlier fix)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 10:01:29 2024 UTC