From:             larry at ldrutlege dot com
Operating system: 
PHP version:      5.4.10
Package:          Class/Object related
Bug Type:         Feature/Change Request
Bug description:Privater abstract functions

Description:
------------
>From the page http://php.net/manual/en/migration51.oop.php


"Abstract private methods were supported between PHP 5.0.0 and PHP 5.0.4,
but were then disallowed on the grounds that the behaviours of private and
abstract are mutually exclusive."


This was true in PHP 5.3 and earlier since any method declared abstract
private could not be accessed outside the declaring class and so the
definition was without function.

In PHP 5.4 and later however, traits may have access to private methods of
a class and so an abstract private definition may have a purpose. For
instance, traits may have need of helper methods which may be needed only
by the trait's methods and nowhere else. In those cases, an abstract
private method may be the appropriate declaration to place in the trait to
ensure the helper method is defined in the using class.

Abstract private methods however remain useless except within traits, so
within traits is the only place they need to be permitted.

And as an aside, the word "behaviors" is misspelled on that page.


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

Reply via email to