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

PHPEverywhere:
PHP 4.4 Breakage
Jun 17, 2005 @ 11:23:25

This new post on PHPEverywhere today points out two things: the PHP4.4 beta fixed some of the crashing issues in Windows he was having, and a bit of bad news - a new, potentially nasty bug.

The bad news is this quite disturbing, as PHP4 has been out for over 5 years yet no one has found this error before. The fact that PHP4 is known for reliability also suggests that references are a rarely used feature. Now you need to use references a lot in PHP4 to implement OOP well (otherwise all assignments create a duplicate copy of the object instance), which also suggests the takeup of OOP is pretty low in PHP4.'

He gives this example, with this resulting Warning message:

function &dosomething($a) { $b = false; return empty($a) ? $b: $a; }

Only variable references should be returned by reference in d:inetpubwwwroottest.php on line 8

There is this bug opened, but there doesn't appear to be anyone looking into it...

tagged:

Link:


Trending Topics: