#48912 [Asn->Csd]: Namespace causes unexpected strict behaviour with extract()
| From: | dmitry@php.net | Date: | Tue, 28 Jul 2009 12:37:18 +0000 |
| Subject: | #48912 [Asn->Csd]: Namespace causes unexpected strict behaviour with extract() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-140362@lists.php.net to get a copy of this message | ||
ID: 48912
Updated by: dmitry@php.net
Reported By: david at grudl dot com
-Status: Assigned
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: *
PHP Version: 5.3.0
Assigned To: dmitry
New Comment:
This bug has been fixed in SVN.
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.
Previous Comments:
------------------------------------------------------------------------
[2009-07-28 12:36:09] svn@php.net
Automatic comment from SVN on behalf of dmitry
Revision: http://svn.php.net/viewvc/?view=revision&revision=286453
Log: Fixed bug #48912 (Namespace causes unexpected strict behaviour
with extract())
------------------------------------------------------------------------
[2009-07-28 12:35:28] svn@php.net
Automatic comment from SVN on behalf of dmitry
Revision: http://svn.php.net/viewvc/?view=revision&revision=286452
Log: Fixed bug #48912 (Namespace causes unexpected strict behaviour
with extract())
------------------------------------------------------------------------
[2009-07-15 15:48:15] vrana@php.net
extract() uses ZEND_SEND_PREFER_REF. It seems that it is not compatible
with func_get_arg() under a namespace.
------------------------------------------------------------------------
[2009-07-14 08:29:36] david at grudl dot com
Description:
------------
The namespace clause causes the PHP behaves more strictly (unexpected
behavior according to the documentation - with regard to the namespaces
or function extract).
Reproduce code:
---------------
<?php
// namespace A;
function test()
{
extract(func_get_arg(0));
}
test(array('x' => 1));
Expected result:
----------------
--none--
Actual result:
--------------
When row "namespace A" is commented:
--none--
When row "namespace A" is uncommented:
Strict Standards: Only variables should be passed by reference in ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48912&edit=1