Edit report at https://bugs.php.net/bug.php?id=63201&edit=1
ID: 63201
Comment by: sjaillet at gmail dot com
Reported by: brainreflex at gmail dot com
Summary: PHP 5.4 and Function Overloading
Status: Open
Type: Bug
Package: Unknown/Other Function
Operating System: OS X 10.7.5
PHP Version: 5.4.7
Block user comment: N
Private report: N
New Comment:
Looks like it's an introduced bug since redefining functions still works well
when functions had been called in the same file like the following :
<?php
namespace custom;
var_export('hello'); //hello
eval("namespace custom; function var_export(){echo 'foobar';}");
var_export('hello'); //foobar
?>
Previous Comments:
------------------------------------------------------------------------
[2012-10-02 15:26:53] brainreflex at gmail dot com
Description:
------------
5.4 doesn't allow to redefine function if bult-in function had been called
before. It's a bug or omission of documentation
For more details look at http://vatson.com.ua/blog/2012/10/01/php-5-dot-4-and-
function-overloading/
Test script:
---------------
https://github.com/vatson/php-experiments
Expected result:
----------------
The same behavior for both versions
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63201&edit=1