#22495 [Com]: namespaces cause 'internal compiler error' on includes
| From: | thekid at thekid dot de | Date: | Sat, 19 Apr 2003 01:22:13 +0000 |
| Subject: | #22495 [Com]: namespaces cause 'internal compiler error' on includes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-37884@lists.php.net to get a copy of this message | ||
ID: 22495
Comment by: thekid at thekid dot de
Reported By: andrew at evilwalrus dot com
Status: Open
Bug Type: Scripting Engine problem
Operating System: WinXP
PHP Version: 5CVS-2003-03-01 (dev)
New Comment:
No compiler error here, but this actually won't work anyway.
require_once is nothing like "inline" or "#define" in C. It is not as
if code was simply at this place instead of in the file:)
Previous Comments:
------------------------------------------------------------------------
[2003-03-01 13:38:45] andrew at evilwalrus dot com
Also, adding $this->baz to _debug() does not help.
------------------------------------------------------------------------
[2003-03-01 13:36:43] andrew at evilwalrus dot com
The following script(s) cause an internal compiler error:
----------------- foo.php -----------------
<?php
namespace foo
{
class bar
{
function __construct()
{
require_once 'include.php';
}
function _debug()
{
print $baz;
}
}
}
$foo = new foo::bar();
$foo->_debug();
?>
----------------- include.php -----------------
<?php
function fakefunc()
{
$baz = 'I am foobar!';
}
?>
-----------------------------------------------
Running foo.php via CLI causes the following fatal error to occur:
*Fatal error: Internal compiler error. Please report! in include.php
on line 6*
Running the script without the 'foo' namespace simply outputs a blank
line to the console, with no text returned, and no error generated.
~ Andrew Heebner
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22495&edit=1