ID: 50897
Updated by: [email protected]
Reported By: frederic dot hardy at mageekbox dot net
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Freebsd 7.2/archlinux
PHP Version: 5.3.1
New Comment:
You must have something really really wrong somewhere in your setup if
you get that error. I can not reproduce any of this.
Previous Comments:
------------------------------------------------------------------------
[2010-02-01 10:30:33] frederic dot hardy at mageekbox dot net
the "b" class must extends the "a" class, all my apologize.
------------------------------------------------------------------------
[2010-02-01 10:20:08] frederic dot hardy at mageekbox dot net
Description:
------------
Require() and include() are more strict than a all in one file then
parse php code.
Reproduce code:
---------------
file a.php
<?php
class a { public function test($fool) {} }
?>
file b.php
<?php
class b { public function test($foo, $bar) {} }
?>
file withRequire.php
<?php
error_reporting(E_STRICT);
require('a.php');
require('b.php');
$b = new b();
?>
file allInOne.php
<?php
error_reporting(E_STRICT);
class a { public function test($foo) {} }
class b [ public function test($foo, $bar) {} }
$b = new b();
?>
Expected result:
----------------
In CLI, "php withRequire.php" must give same result than php
"allInOne.php".
Actual result:
--------------
php allInOne.php => nothing
php withRequire.php => Strict standards: Declaration of b::test()
should be compatible with that of a::test() in /path/to/b.php on line 8
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50897&edit=1