From:             lsmith
Operating system: 
PHP version:      5.4.6
Package:          Unknown/Other Function
Bug Type:         Bug
Bug description:"incompatible" signatures for private methods should not cause 
E_STRICT

Description:
------------
Defining a private method in an extending class that matches the name of a
private 
method in a parent class with a different signature currently triggers an 
E_STRICT. As the extending class shouldn't see the parent private methods,
there 
is no reason to trigger an E_STRICT in this case.

Test script:
---------------
<?php

class A
{
  private function foo($bar)
  {
  }
}

class B extends A
{
  private function foo()
  {
  }
}

Expected result:
----------------
no E_STRICT error

Actual result:
--------------
PHP Strict standards:  Declaration of B::foo() should be compatible with 
A::foo($bar) in /Users/lsmith/htdocs/foo.php on line 15

Strict standards: Declaration of B::foo() should be compatible with
A::foo($bar) 
in /Users/lsmith/htdocs/foo.php on line 15

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

Reply via email to