From:             frederic dot hardy at mageekbox dot net
Operating system: Freebsd 7.2/archlinux
PHP version:      5.3.1
PHP Bug Type:     Scripting Engine problem
Bug description:  Require() problem with E_STRICT

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 bug report at http://bugs.php.net/?id=50897&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50897&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50897&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50897&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50897&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50897&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50897&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50897&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50897&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50897&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50897&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50897&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50897&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50897&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50897&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50897&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50897&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50897&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50897&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50897&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50897&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50897&r=mysqlcfg

Reply via email to