Zend Weekly Summaries Issue #195

TLK: 5.0.1
FIX: Segfault reports
NEW: PHP 5 installer
TLK: Sort behaviour
TLK: PHP Java extension
FIX: Across all branches
TLK: Splitting the atom
FIX: fstat
PAT: ODBC and calendar


TLK: 5.0.1

Andi Gutmans announced at the start of the week that he was looking at an early
release for 5.0.1 due to the HTTP_AUTH issue in 5.0.0. He requested
that everyone with fixes to add should add them as soon as possible. At the end of
the week – many small fixes later – he put out a second call, saying he’d like to
roll 5.0.1 on Monday or Tuesday. Edin Kadribasic reported that Dmitry Stogov
had committed a lot of fixes to the SOAP extension but not merged them to the 5.0
branch. It turned out that Dmitry was on holiday at this point, so 5.0.1 is now
waiting for him to return to work.

Short version: It should be out by the end of this week.


FIX: Segfault reports

Both Kevin Waterson and Håvard Eide reported seeing mysterious segfaults in PHP
5.0 that were still in CVS HEAD. Håvard provided rather more information about his
problem, and Rasmus Lerdorf suggested that he should run it through valgrind. Håvard
did as requested, but didn’t know how to make the leap from Valgrind output to fix.

Antony Dovgal found where zero was being malloc’d, and fixed it with the new
STR_EMPTY_ALLOC() call. His patch was added to CVS by Sascha Schumann
the following Monday morning. Antony finally was given core CVS access just in time
for the news to be included here.

Short version: Say hi to the newest PHP dev team member!


NEW: PHP 5 installer

Gabor Hojtsy, the PHP Manual editor, forwarded a few of the several requests he’d
received for a Windows installer for PHP 5, along with a query of his own. Phil
Driscoll wrote in to say that he had built and tested one, and felt it was good
enough for php.net to use as their official install system. Edin, who is in charge
of all Windows-related php.net distributions, committed Phil’s installer to CVS
later that day.

Short version: PHP 5 windows installer – now showing on a server near
you.


TLK: Sort behaviour

John Coggeshall wrote in to say that


<?php

$a = array('a', 'b', 'c', 'a'=>0, 'b'=>1, 'c'=>2);
sort($a);
print_r($a);

?>

gives unexpected results, and forgot to attach a patch that would alter this
behaviour. Marcus Börger agreed, but pointed out that there were two possible
versions of ‘expected behaviour’, both equally valid. He mailed in a patch for one
of those versions. Andi responded that he was concerned the ‘fix’, whichever
direction it took, might break backward compatibility and also affect other
functionality, as it actually involves altering the Zend engine’s comparison
operators. The patch is on hold pending further investigation into these
possibilities – or we could just accept that this is how PHP’s sort()
behaves, and fall back on alternative functions or user-space workarounds to deal
with the fact, as of yore.

Marcus went on looking into sort(), and subsequently committed a
patch that gives the function a 15% performance increase, while supposedly listening
to an OSCON talk about performance. This was one among many performance patches
committed during the week, primarily by Marcus and Andi.

Short version: sort() still gives strange results, but now
it gives them faster.


TLK: PHP Java extension

Cyril Pierre de Geyer wrote to the list requesting information about the Zend/Sun
partnership’s Java extension for PHP 5. Andi explained that Sun are working on a
reference implementation for PHP 5 alongside JSR 223, and he didn’t have an e.t.a.
for this.

Short version: It’ll happen when it happens.


FIX: Across all branches

Andi committed a patch that makes MAC OSX always use DSO loading.

Wez Furlong, looking into thread safety issues, committed a series of patches
that fix threading issues on Windows platforms. He also fixed a bug which prevented
cgi, cli and embed SAPI from being able to use php.ini entries for
dl()‘d extensions in ZTS (thread safe) builds – again, this was
primarily a win32 fix.

All these fixes were back-ported; the first two as far as the 4.0 branch and the
third as far as the 4.3 branch.

Short version: Not much here for Linux users, but everyone else should
be happier now.


TLK: Splitting the atom

Sara Golemon was convinced (on irc, by Ilia Alshanetsky and Wez) that her
two-month old Zend Engine exercise might be of interest to a wider audience. They
weren’t wrong; at the last count it had generated 172 emails on the internals list,
not to mention several more uncounted items in sub-threads and on other lists.
However, a fair amount of it was generated by the fact that Sara, buoyed by the
response to her initial list mail, added this fairly major change to the Zend engine
CVS without first consulting Andi, who is the Release Master for the 5.1 series, and
was also an OSCON attendee at this point (for which read: had limited internet access).

Needless to say, when Andi caught up with his mail, he immediately asked Sara to
revert those commits, which Sara duly did. The two remain on speaking terms, and
Andi is helping her to improve her implementation off-list.

Some people are very much for the inclusion of goto in PHP, and
others are very much against it. There are strong arguments on both sides; but in
the end this is a discussion about the nature of PHP as a language, which is a far
more subtle thing than a discussion about the nature of a feature. Should we be
handing people new to coding goto on a plate? Should we be (and are
we?) limiting very experienced developers by not providing it? Wouldn’t a
goto implementation in PHP necessarily have so many safety features
that it wouldn’t resemble goto at all? Most of all, is the internal
development list really the best place to cast votes regarding a language feature
that should only be used by experienced developers?

Short version: This week was going to be soooo quiet…


FIX: fstat

Wez nuked the duplicate stat call mentioned by Rasmus last week, at Andi’s
request. He also implemented an fstat cache for plain files, which
ought to speed up the realpath() implementation some (if not as much as
Andi’s own patch – still lurking in the shadows – would).

Short version: Minor and non-controversial optimisations for realpath() in time for PHP 5.0.1


PAT: ODBC and calendar

Mostapha sent in an ext/calendar source patch implementing his copy of hijri.c,
which is still in the PAT directory waiting for someone with the requisite expertise
to review it. Sara picked up his mail, and responded with "http://www.zend.com/lists/php-dev/200408/msg00015.html">a bunch of
suggestions
for improvements.

Edin rewrote large amounts of win32/install.txt this week, including the mysql
guidelines that Philip Olson’s patch was intended to replace.

Dave Lawson sent in three separate patches affecting different areas of ext/odbc.
These are sitting in the PAT directory
awaiting Dan Kalowsky’s return to the fold.

Short version: hijri.c, ext/obdc patches, and several other items are
waiting to either be applied or rejected.

Published: August 2nd, 2004 at 12:00
Categories: Uncategorized
Tags: