Php Internals Summary - June 10th to 20th

Yes yes, I know, this is late - but monday to monday seems to be a more sane schedule for these...

The tenth started out with a brief agreement to the push for 5.1, with most developers agreeing that the unicode stuff needs to be put in HEAD very soon so people can start breaking it.

Somewhere in the noise was a thread about incrementing boolean values and how php's magic casting sometimes made that do weird, strange things. But the bottom line seemed to be that incrementing a boolean wasn't really a smart way to do things anyway, but a quick trip to the manual shows how it should work.

Wez reminded anyone doing builds on win32 that they needed to update both /php-src and /pecl or strange things might happen.

4.4.0 RC1 was rolled and the plan is to release on the 27th if all goes "according to plan" and a 5.1 Beta 2 plan was also set up, so the evil PDO problem could be remedied quickly.

Someone broke the windows build somewhere along the way - and Jani as usual had it fixed promptly.

Also the catalan translation is starting to roll, so there were quite a few php-doc CVS requests, along with the occasional pear and pecl requests. I still think there has to be a better way to do those requests. Several patches floated on the list as well...but little comment was made on them.

The big discussions of the week, however, were: adding public as a var alias in php 4.4 to ease the transition to php 5 and ifsetor. The bottom line on the public keyword was that the change would in essence add another branch to the php tree (yuck) and E_STRICT is really E_PENDANTIC (so why didn't they name it that instead?) and that production servers shouldn't have it on anyway - so the php.ini recommended for 5.1 was changed to reflect that fact. Ifsetor was effectively killed - as working userland code could replace it easily and everyone had a different idea on how ifsetor should work.

There was a brief discussion on how instanceof doesn't really replace is_a because it will die with a fatal error if it can't load the class - but other than Wez agreeing that a fatal error was overkill, there's still no fix for the problem (or even an agreement that it IS a problem).

5.1 Beta 2 is currently waiting on Derek to finish up his new date stuff ( timezone support and other goodies) before it can get rolled and go (so blame him :) There's also a __toString patch floating around somewhere that needs to be reviewed.

The bug summaries hit and seemed very large...349 total including feature requests for php5 and 663 total including feature requests for php4 - here's hoping summer allows for more bugfixes :)

It seemed to be a slow week - relative to the one before, but the E_STRICT and ifsetor discussions kept things lively.



can you explain what ifsetor is/should be or point me to a resource that does? thanks, and i'm enjoying the summaries.

2005-06-20 7:24 pm


the problem is everyone has a different idea on what ifsetor is/does/should be the basic idea is to use it as a replacement for this

$newvar = isset($somevar) : $somevar : 'default value';

in other words, the annoying ternaries people have to write all over the place to avoid php_notices for undefined variables

the difference is in the implementation - some people want to use it recursively on arrays, others want to check not only if it's set but also if it's empty, some people just want it to return if it's set, other want a default value applied if it's not

Someone on the list...I don't remember who and I'm a bit lazy to look it up at the moment, came up with a rather clever userland implementation for a basic ternary replacement that I've taken to using.

function ifsetor(&$var, $default = NULL) { if(!isset($var)) { $var = $default; } return $var; }

Now, it basically means that if the variable you send ISN'T set a the beginning it will be at the end and it creates some empty references, but it's a pretty easy to use and effective thing when you're inside an array five or six deep checking to see if a value exists.

2005-06-21 3:20 am


cool, thanks, great explanation!

2005-07-01 7:56 pm

Post a Reply