PHP4.0 beta released
Emphyrio writes "Today, the first beta of Zend (php 4.0 scripting engine) was released.
Php 4.0, in combination with the Zend scripting engine, is supposed to be a faster, more efficient, and enhanced version of php 3.0.
Benchmarks between php 4.0/Zend and ASP have been made, giving _very_ good results, and showing php 4.0/Zend to outperform asp greatly.
Php 4.0 is the first public php release using the Zend scripting engine, wich is relased under the QPL source license.
More information about Zend and php 4.0 can be found on the Zend home page and the Php 4.0 homepage. . "
I am also a PHP developer and personally I think it is great if the PHP/ZEND sites are being /. (if indeed that is what happened). PHP has done very little, IMHO, to publicize itself. Most people know what ASP and Perl is, but very few (that I have run accross) people have ever heard of PHP.
publicity => more users => more developers => better product
The site will likely be available, as usuall, 8 hours from now. I have been chompin' at the bit for this release for months, a few more hours won't kill me.
Relax a bit.
DS
"Please do not reply if you're an evil alien! Thanks"
Its like a train wreck. Stuck PHP4 on one of my testing servers, virtually none of the existing base of PHP3 code seems to work properly.
Has anyone had much luck with it?
Some code elements are obvious enough why they don't work. I'm not clear exactly why they would no longer allow non-static defaults to parameters in class constructors. Much of my code doesn't work because of that, but that can be (much less elegantly) fixed. They claim there's not very many situations where you'd want to do that, but I can think of dozens of them.
Also, PHP4 doesn't seem to like returning instantiated objects from methods in a class. I'm not clear why it wouldn't allow that, but it craps out with a parse error. Its possible that error messages in PHP4/Zend suck, as well, since that particular one isn't a documented incompatability, and perhaps its saying the error is on that line when the error is in the parsing of constructor for the object being returned.
(if that wasn't clear, code like this doesn't seem to work:)
function my_function($var = "") {
return new OtherObject ($this, $var);
}
Worked fine in PHP3. The error message sucks, so its not clear if the error is in the returning of the object, in the passing of my current object to the new object, or possibly in the constructor for the object.
Has anyone done any serious OO coding in PHP3 and had it work cleanly in PHP4? I recognize that a lot of the OO functionality wasn't documented, and should've known it could be changed, but some of this stuff isn't rocket science, and works in most other OO languages.
Anyway, good in concept, but looks like I'll be sticking to PHP3. I wonder how long development will continue on the PHP3 code base...