Question on "use" behavior

From: Date: Thu, 20 Dec 2007 19:20:04 +0000
Subject: Question on "use" behavior
Groups: php.internals 
Request: Send a blank email to internals+get-34164@lists.php.net to get a copy of this message
Consider the following code: test.php: <?php include 'foo.php'; use test::foo; foo(); ?> foo.php: <?php namespace test; function foo() { } ?> Is it expected behavior that the scripts ends in: Fatal error: Call to undefined function foo() ? That's all for now. Best regards, Martin Alterisio PS: Is there any benchmark that could be run to test out what's the impact of the delayed name resolutions? I believe is not considerable but I'd like to test in my machine and provide some feedback, and I don't know if what I'm trying to do as benchmark is reliable ("time <phpscript>" and shell-scripting for data compilation).

« previous php.internals (#34164) next »