Bug #64346 [Opn->Ver]: Function name resolution and eval

From: Date: Mon, 04 Mar 2013 10:38:18 +0000
Subject: Bug #64346 [Opn->Ver]: Function name resolution and eval
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-177561@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64346&edit=1 ID: 64346 Updated by: laruence@php.net Reported by: gen dot work at gmail dot com Summary: Function name resolution and eval -Status: Open +Status: Verified Type: Bug Package: *General Issues Operating System: Ubuntu 12.10 PHP Version: 5.4.12 -Assigned To: +Assigned To: dmitry Block user comment: N Private report: N New Comment: confirm this change. this is due to the 5.4 performance improvement: "literal cache" @dmitry, maybe we should not cache the function entry for INIT_NS_FCALL? thanks Previous Comments: ------------------------------------------------------------------------ [2013-03-04 10:11:24] gen dot work at gmail dot com Description: ------------ The code below works as expected on version 5.3. Test script: --------------- namespace Foo { function bar() { var_dump(is_callable('Foo\\time')); var_dump(time()); } } namespace { \Foo\bar(); eval('namespace Foo; function time() { return -1; }'); \Foo\bar(); } Expected result: ---------------- bool(false) int(1362390237) bool(true) int(-1) Actual result: -------------- bool(false) int(1362390237) bool(true) int(1362390237) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64346&edit=1

« previous php.bugs (#177561) next »