PHP.net announced over the weekend that the first public beta of PHP 5.1 (5.1.0) is now available for download on PHP.net.
So what’s changed?
- The PCRE library (providing Perl-style regular expression support) has been updated to version 5.0.
- Several performance improvements, including changes to garbage collection, the switch statement, and several array functions.
- Several improvements in the PostgreSQL and Improved MySQL support.
- Several new functions including array_diff_key, array_diff_ukey, array_intersect_key and array_intersect_ukey.
PHP 5.1 can be downloaded from PHP website.
As of now there is an entry PHP.net’s RSS feed about the release but no word about it on the front page of http://www.php.net/.







I read this and thought there was already another release. It’s PHP 5.1.0b1…
June 14th, 2005 at 2:49 am
I was about to finish my own OO data-abstraction, and now it’s native in 5.1 :(
On the other hand, data-abstraction is native in 5.1 :)
June 14th, 2005 at 3:04 am
See about a problem with PHP 5.1 – if you get the snapshot though it should be fine: http://www.netevil.org/node.php?uuid=42aafccd-2812-2642-6775-2aafccd47217
June 14th, 2005 at 3:14 am
The other big inclusion is PDO built in. I am not sure whether the PDO drivers get built automatically when you build any of the old db libraries, but it is there by default.
June 14th, 2005 at 3:57 am
Yes if you enable pgsql it will build with the native ext and the pdo driver.
June 14th, 2005 at 5:55 am
> The other big inclusion is PDO built in.
Now that is good news. I have PDO on my laptop but not the desktop as I can’t be bothered to transfer the DLLs over :lol:
But I can’t see myself downloading and upgrading at the moment, not got the time nor the inclination to do so, so PHP5.0.3 stays with me.
June 14th, 2005 at 10:53 am
Ok, let’s all just boycot php & zend until they give us namespaces….
5.5 (or whatever they are going to call it, since it’s up in the air) is supposed to have native utf8 support. This is great, and a step forward, but yet, we are still going to be waiting YEARS for namespace support.
June 14th, 2005 at 6:51 pm
What is PDO?
June 15th, 2005 at 2:08 am
Have a look at:
http://wiki.cc/php/PDO_Basics
June 15th, 2005 at 5:27 am
php is not java. and it’s not intended for the things java was. why make such a big deal out of namespaces?
June 15th, 2005 at 6:00 am
“why make such a big deal out of namespaces?”
Because many of us use PHP for much more than simple scripts. And if you try to use something like Propel alongside a PHP MVC Framework, things can get very messy.
Plus, namespaces are just useful in general.
June 15th, 2005 at 9:42 am
So what’s different with the swtich statement?
June 15th, 2005 at 11:05 am
“Ok, let’s all just boycot php & zend until they give us namespaces….”
What about creating a PHP namespace petition somewhere? :) I think lots
of serious PHP developers would gladly sign it…
“Because many of us use PHP for much more than simple scripts. And if you try to use something like Propel alongside a PHP MVC Framework, things can get very messy.”
Very true!
June 16th, 2005 at 3:46 am
Annoying: click in “Your name” box to type my name in, got a stupid pop-up instead. :|
Namespaces, eh? How about just using static class methods to namespace your functions? Seriously, aside from having to place all the code in one file, what is the difference between namespaces and the following:
class MyCoolProject {
function doThis() { }
function doThat() { }
}
Or just prefix your functions/classes with a proper name:
MyCoolProject_doThis()
MyCoolProject_doThat()
No, you can’t just import namespaces and use shorthand versions, but then you’d still run into name collisions there if you did.
In other words: meh.
June 16th, 2005 at 5:23 pm
well, technically you could do something like this
< ?php class namespace { static public function obj( $obj_name ) { return new $obj_name; } } namespace::obj( 'some_object' )->blah(); ?>but it’s still just an ugly hack.
June 17th, 2005 at 6:03 am
I think this native Database Abstraction is a great step to get away from the usual thought that php and mysql are similiar… and furthermore I hope more Providers (especially the german ones :( ) will now be forced to move to php 5!
June 22nd, 2005 at 6:53 am
If hosts would just start switching to PHP5 already (if it got out of beta they would do it btw.. you can’t expect professional hosting services to switch before it is fully released) i would force myself to get familiar with the changes!
I really do like this new idea about native DB abstraction
June 28th, 2005 at 7:10 pm
[quote="selfmindead"](if it got out of beta they would do it btw.. you can’t expect professional hosting services to switch before it is fully released)[/quote]
Eh??? PHP 5 has been release for almost a year now.
from http://www.php.net/news-2004.php
[quote="PHP news"]PHP 5.0.0 Released!
[13-Jul-2004] The PHP team is proud to announce the final release of PHP 5!
Some of the key features of PHP 5 include:
* The Zend Engine II with a new object model and dozens of new features.
* XML support has been completely redone in PHP 5, all extensions are now focused around the excellent libxml2 library (http://www.xmlsoft.org/).
* A new SimpleXML extension for easily accessing and manipulating XML as PHP objects. It can also interface with the DOM extension and vice-versa.
* A brand new built-in SOAP extension for interoperability with Web Services.
* A new MySQL extension named MySQLi for developers using MySQL 4.1 and later. This new extension includes an object-oriented interface in addition to a traditional interface; as well as support for many of MySQL’s new features, such as prepared statements.
* SQLite has been bundled with PHP. For more information on SQLite, please visit their website.
* Streams have been greatly improved, including the ability to access low-level socket operations on streams.
* And lots more…
For changes since Release Candidate 3, please consult the ChangeLog. [/php]
June 29th, 2005 at 5:23 pm
PHP5 is great, but I agree fully with the namespace arguement.
Yes, it’s possible to simply wrap all your functions up as static class members, but that only works so far. Trying to do it with a class is a pain in the butt.
You can do something like this for functions
function __autoload($Class)
{
require_once(CLASS_DIR.$Class.’.php’;
}
include the file using php’s auto_prepend ini settting,
and:
< ?php
NameSpace::DoSomeFunction();
?>
Will be perfectly valid.
My current solution to the class name issue is a simple one, of course — I just make sure to name my classes something unique and descriptive.
I think the best solution, without any performance overhead, would be a mechanism like a triple-colon:
NameSpace:::Function();
NameSpace:::ClassName();
Not as clean as C++ namespaces (due to the extra colon), but it would create a unique operator that wouldn’t have to change the current logic of the compiler.
July 4th, 2005 at 2:13 pm
There is a petition online FYI:
http://www.petitiononline.com/phpns/petition.html
August 17th, 2006 at 6:05 am
boccar
September 18th, 2008 at 7:18 pm