PHP 5.3 Released
Sudheer writes "The PHP development team is proud to announce the immediate release of PHP 5.3.0. This release is a major improvement in the 5.X series, which includes a large number of new features and bug fixes. Some of the key new features include: namespaces, late static binding, closures, optional garbage collection for cyclic references, new extensions (like ext/phar, ext/intl and ext/fileinfo), over 140 bug fixes and much more."
Now I don't have to do a song and dance of ugly hacks to get what I need from a file on systems without the extention.
Oh wait, almost any PHP project eventually gets reduced to a song and dance of ugly hacks.
Women are like electronics: you don't know how damaged they are until you try to turn them on.
You forgot the most important change of all.
They added support for "goto".
PHP now comes with more GOTO!
A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
It's high time we forget about PHP and all it's bain-damaged design
Say what you will about PHP, but it puts food on my table and a good roof over my head. I have been clamoring for the new features in PHP 5.3.0 (closures, namespaces, they finally killed register_globals) and can't wait for the improvements coming in 6.
I truly appreciate the hard work of the PHP development team and the free language they have given us, congratulations on the new release.
I went to eat some animal crackers and the box said, "Do not eat if seal is broken." I opened the box and sure enough..
So does this mean I should upgrade from PHP 3.2? Are there any incompatibilities with my existing code?
//$login_check = mysql_num_rows($result_login);
Maybe someone can look over my login script and tell me if this will work in PHP5?
$query_login="select * FROM user";
$result_login = mysql_query($query_login) or die("Your passwrod is might be bad I think");
while($row=mysql_fetch_array($result_login))
{
$username=$row["username"];
if ($username==$username1)
{
echo "";
echo "window.location.href='login_error.php?rec=qq';";
echo "";
exit;
}
}
MABASPLOOM!
...is the ability to employ goto, though it is not allowed to jump into a loop or switch statement. A fatal error is issued in such cases.
The lack of namespaces in any programming language is a massive car wreck just waiting to happen. I once spent a few days trying to resolve an issue with a web portal application with different components brought together where the issue was caused entirely by a function name collision.
This space left intentionally blank.
Years of php programming have danaged my bain to!
He tried to kill me with a forklift!
see whats new in PHP 5.3. Namespaces, phar, Closures & Lambdas, Functors, Traits,Magic functions. See link above for examples.
Let's say you've been using PHP since about a month after Rasmus released it 15 years back, so you've got a whole lot of code that uses the ereg family of regex functions. So they've depricated them, and plan to yank them from PHP 6. Why? Is the overhead so terrible? Or do they really think that it will improve our lives if we have to go back through everything and translate eregs to pregs?
Then there's the change in MySQL password formats. Sure, if they include the latest MySQL libraries they have a different encryption level. But if PHP is smart enough to warn you about that when your MySQL install is still using the older passwords, then PHP should be smart enough to include both libraries and use whichever one is appropriate to the passwords encountered.
There's a huge codebase out there that's using PHP against MySQL, and using PHP's original ereg regex syntax instead of the Perl-wannabe stuff. What are they thinking, when they set out to break this? When 5.3 rolls out through the distros a whole lot of MySQL backends will fail on the password thing. And when 6.0 rolls out millions of regexs will suddenly be failing. Needlessly.
"with their freedom lost all virtue lose" - Milton
What feeture is PHP missing already, otherwise I would use it :)
davecb5620@gmail.com
OH-MY-GOD! Nobody complaining about the weird namespace separator!
as of this version, windows nt 4 will no longer be supported :-(
Separation of concerns is a concept in object-oriented (OO) software design that allows you to build more-modular applications. Modular applications are easier to maintain and add new features to. PHP's OO language features allow you to apply design concepts to build more robust, maintainable applications.
That's probably because no one will be using them due to their hideousness.
MABASPLOOM!
Separation of concerns is a concept in *all* schools of software design. Only retards think that it was OOP that brought us namespaces, modularity, exceptions, polymorphism and things like that.
Ezekiel 23:20
Looks like that link's slashdotted! IBM? Surely not?!
The PHP development team has no vision, and they haven't ever had one. It's a hodgepodge that started out to be a "web perl" way back in the day, but then Java developers started using it and so 5 looked more and more Java-esque, but obviously being Java isn't their vision either. Take the namespacing in this release. They are using the BACKSPACE as the namespace separator. It's f'ing awful and inconsistent, but they wanted to jam it into 5.3 ... even though Dimitri had a patch that would have used "::" for the separator, the PHP devs didn't want to use it because it would have to go in PHP 6.
That's because, just like the inconsistent library arguments, the PHP developer community, like it's user base, is "practical" .. they will sacrifice correctness for easiness. It's the same reason there's no way to flip a php.ini directive and have annoying warnings/errors turned into exceptions instead... "It's hard (because our codebase is shitty.)"
PHP sucks, but it doesn't matter to most. It's too popular. But it does suck because there's no consistent vision for it.
Some time ago I *had* to work with PHP. I haven't known it before that. Now I hate it =). At that time I wrote a comparison, out of anger about PHP being so much used. This is the comparison Java - PHP I have wrote.
Can anyone give an example of a good use of lambdas in php? I'd appreciate both 1. A situation where you would *have* to use it ( or the way to do it without lambdas is such an ugly, counter-intuitive hack that no one would do it ), and 2. an example of where you might use lambdas naturally.
I've been trying to figure them out since they were announced for 5.3. I think I understand them, but I don't know whey or where you would want to use them.
Computers are useless. They can only give you answers.
-- Pablo Picasso
Blah de blah PHP is shit because [insert random piece of php code that a programmer could use if they were a complete fuckwit] Everyone should use [insert my favorite scripting language] because [insert totally irrelevant feature nobody give a fuck about]
www.boznz.com Simple solutions to complex problems.
.. begins! Maybe in another 2 years we'll get this into CentOS/Redhat.
And by the looks of it, we might see PHP 6 around the same time we return to the moon.
(and I choose the space program as a comparison to another endeavor that seems to be progressing at a rediculously slow pace)
-- Senior Software Engineer, Attorney appearance services, locallawyerapp.com.