News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Content With Style:
buggy behaviour of parent in PHP 5.3.3
December 20, 2010 @ 09:43:56

On the Content with Style blog today they take a look at some buggy functionality with parent:: they've found in the latest version of PHP, 5.3.3.

So, this app I hadn't been looking at in a few months did not work at all. I traced the bug down to a method that itself called a parent method. The parent only contains __call and __callStatic methods, and for some reason __callStatic was called, although the class it was called from was an object instance.

After using some sample code from the PHP manual, they spotted how things truly worked - the call is always sent to __callStatic when called from the extending class but not when called directly. Apparently they aren't the only ones that noticed the bug but noted that it was removed in PHP 5.3.4 to fix the issue.

0 comments voice your opinion now!
bug version parent static callstatic method


blog comments powered by Disqus

Similar Posts

Lorna Mitchell's Blog: Accessing the Magento V2 API

Matthew Weier O'Phinney: ZF2's New Controller::init()

Debuggable Blog: How To Execute Only Specific Test Methods in CakePHP Unit Tests

Filip de Waard\'s Blog: Stay away from PHP 5.1.3 (for now)

Pierre-Alain Joye's Blog: ext/filter, API frozen (!) and fixes, 0.11.0 is out


Community Events





Don't see your event here?
Let us know!


laravel community install interview list testing symfony2 framework language developer api release series podcast opinion threedevsandamaybe unittest code refactor introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework