PHP 5.5.0 Released
New submitter irventu writes "The long-awaited PHP 5.5.0 has finally been released, bringing many new features and integrating Zend's recently open-sourced OPcache. With the new Laravel PHP framework winning RoRs and CodeIgnitor converts by the thousands, Google recently announcing support for PHP in its App Engine and the current PHP renaissance is well underway. This is great news for the web's most popular scripting language."
The full list of new features is available at the Change Log, and the source code is at the download page.
first
I'm still waiting for a PHP 6.0 that's an actual rewrite without all the stupid. With every new version, I just see more features get tacked on ("Objects").
It's wonderfully backward compatible because nothing really gets removed in newer versoins, but it would be nice if the language could be made more pleasant to use.
I participated in beta release testing for 5.5 and I'm frustrated that it still has old bugs that cause segfaults that continue to go ignored by the maintainers. I even supplied the patch and submitted a Github pull request, but the maintainers continue to ignore it.
It's no fun having to keep our own custom patchsets for PHP just to keep it running properly.
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..
For Laravel?
Why u no Symfony?
With the new Laravel PHP framework winning RoRs and CodeIgnitor converts by the thousands
Citation needed. Why does the summary contain this blurb which is not even relevant to the story. Me suspects that the submitter could be an advocate who just ceased on an opportunity to tell slashdot about his favorite PHP framework.
Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
You only need a peek to see this Laravel dubbed "PHP renaissance" does not even try to be statically safe. It's littered with pitfalls like writing your validators with strings, such as: "array('name' => array('required', 'min:5')), ...".
(It is possible to write statically typed validators, with clean syntax (depending on language) and you end up not loosing stuff like auto-completion, semantic checking by IDE etc. See for instance latest Scala PlayFramework and it's JSON validation, it is relatively easy to use, and syntax is surprisingly succinct taken the fact it's extremely type-safe.)
I guess that's when everyone gathers around dressed in renaissance costumes, drink warm beer, speak in mock-British accents, and reminisce on the times when knights were bold and PHP was cool
With the new Laravel PHP framework winning RoRs and CodeIgnitor converts by the thousands
Citation please.
Why the hell would anyone choose so insane technology for new applications written from scratch? We should let PHP die in peace.
It's pretty simple. There are people who learned most of their written language from written word, and there are people who learned most of their written language from spoken word. The person above is the latter.
Is for someone to write a new standard API that can sit in parallel to their old one that gives us sanity like string manipulation functions with real names and consistent parameters. You know stuff like:
$x = string::indexOf($source, $needle);
and
$x = string::replaceAll($source, $needle, $regularExpression);
CodeIgnitor? Maybe. RoR? Um, no. Or, perhaps, in your dreams.
As an RoR developer who left PHP years ago I assure you - we aren't just waiting for a really good PHP framework that's an RoR knockoff. Part of the greatness of Rails is Ruby, and looking through the Laravel docs just confirms that. It looks like Laravel is about as nice as you can get on PHP, but ultimately it's still PHP underneath (and on top).
Rails is a meta-language built on top of Ruby. Just can't do that in PHP.
And that's not even getting into the ugliness of PHP's cruft that's been built up over the years.
Do you have ESP?
Yes it has its flaws, yes you sometimes don't know whether you're looking for needles in haystacks or haystacks in needles, but it's not like they're not aware of that, and it's not really a big deal either in these days of syntax and function aware editors and instant online reference, and it has provided me and i'm sure many thousands of other people with a career not just in contract coding but also in being used almost exclusively on our own websites.
Thanks guys!
I've never understood why they can't make the $ optional for variables that are used outside of strings.
All those $s are like 1000s of little speed bumps everywhere, slowing me down as I try to read the code. They're infuriating because I know that a vast majority of them are not needed, as proven by many other languages.
Taken a quick view at Laravel, it's again a framework like one in a dozen.
All such PHP projects can be divided into to groups: frameworks and CMS-es. A big problem with all those PHP frameworks is that you have to write stuff like user administration, authentication, static pages from the database, etc yourself. In my opinion, in many cases the MVC architecture is not implemented in a clean way and it's often too complex to translate an URL to an actual file on disk.
A big problem with most CMS-es (like Wordpress, Joomla and TYPO3) is that it's one big chunk of code. There is no clear separate framework layer. It's quite a torture to add or change functionality by writing code. And don't even get me started about security!
That's why I wrote the Banshee PHP framework. Clear MVC implementation, easy routing, strong focus on security and clear separation between framework layer and CMS. Clear the controller, model, view and css directory and what's left is the framework. Although I call it a framework, it's more of a framework / CMS hybrid.
It is not my intention to spam about my framework, but I realize this post can be seen as such. Sorry for that. I only want PHP developers to know there is more than those minimalist frameworks or bloated CMS-es.
It doesn't have to be like this. All we need to do is make sure we keep talking.
then disaapeared
I have two guilty pleasures: Watching the show COPS, and programming in PHP.
I dream about getting away from PHP and occasionally dip my toes in other waters (Python, Java, and even C++) but always come back to PHP. I won't go to Ruby for as many websites start with Ruby and then abandon it for many other languages. People blah blah about MVC but often what I am doing is just too damn simple to need such added complexity. I might need a program that I occasionally run to view a list of spam flagged submissions; it is done in 10 minutes in PHP. I don't use any frameworks and am diligent enough to keep things running through prepared statements and whatnot. With opcode caching and memory caching of data PHP is very very fast.
It is not so much that PHP is the best at anything it is that it isn't really terrible at anything I care about. Almost every other language is terrible at at least one thing that I do care about.
Personally I think that PHP gets its bad rap because it is a very easy transition from HTML. So you have basically non programmers starting to sprinkle PHP into their HTML and oddly enough an untrained programmer's first efforts end up being crap. Then because PHP covers all the web server basics these programmers potentially never venture beyond PHP and there is nothing better for making a bad programmer than a one language programmer. (Not someone who primarily programs in one language but one who only ever learned the one language) So these same programmers keep expanding the scope of their terrible code.
So if anyone can suggest a programming language to replace PHP I would love to know (and all JVM languages are off my list).
escape_string_no_we_mean_it_this_time_why_are_you_laughing_v2
My rule of thumb is that if the escape function is a method of a database connection object, such as the $conn->escape_string() of MySQLi, it's the real deal. But most of the time, I just use prepared statements, reserving manual escaping for things like the right side of operator IN that would need a large, variable number of placeholders.
The PHP Renaissance is here and it looks just like PHP from five years ago. The router in Laravel interacts directly with the models for setting up request vars? Doesn't anyone else think that's idiotic? Shouldn't the router focus predominantly on routing? Shouldn't you drive state into the controller? Or does Laravel just follow the typical PHP approach to making everything in your app fat for the sake of keeping the developers dumb?
If this is a PHP renaissance I'll keep using Ruby, or pretty much anything else.
Why drive nails with a screwdriver when you could use a hammer instead?
Because hosting plans, especially budget shared hosting plans, are more likely to come with a screwdriver than with the particular version of a hammer that your application needs. You could have the best web app in the world written in Perl or Python, but you'll pay more to run it than you might on PHP-only hosting. MySQL is popular for the same reason: ubiquity on entry-level hosting.
Given that I've seen exactly zero PHP programs running as scripts outside of a webserver environment, I'm calling bullshit on the idea of PHP being a scripting language, let alone "the web's most popular" one.
Dewey, what part of this looks like authorities should be involved?
Being stuck developing on other peoples servers.
One thing I found very strange was how much it matters. It is surprising how many necessary, basic features have just been added.
Troll is not a replacement for I disagree.
Comment removed based on user account deletion
Really, the quality of PHP depends on the person writing it. Bad code is bad code in any language, PHP does not cause you to write bad code, the problem is you! PHP is the most popular scripting language, most servers support and more importantly, there is a ton of documentation and examples about. I really can't see why people hate it so much, I guess we are probably looking at some form of Fanboi war, apple vs m$ type bullshit. There are many ways to skin a cat (in regards to programming) with PHP being probably the most inexpensive way to achieve what you need to do on the server side. It is either this or use one of the "cool" languages and pay more... whatever
im guessing javascript somehow doesn't qualify? lol
The biggest PHP problems mentioned I agree with:
1. The way errors don't always trigger exceptions is completely wrong and I guess it's because of the way things evolved. It's a pain, and at the moment you have to deal with it. It's not beautiful, but it's not the end of the world either
2. Type coercion is not natural in many cases but I'm not sure if it just hasn't been thought through, or if it's a natural conclusion of starting with "0" == FALSE, which is *very* handy. Maybe someone else can help answer this
(Type coercion should be one of the first lessons in PHP, that way it at least sounds familiar if you ever run into the problem).
Regarding the renaissance thanks to Lavarel, I don't buy it. The article reads almost like a press release.
This is a pet peeve of mine and the following is quite ranty, but I wrote it to a friend and I thought it might be useful to get some feedback from readers here: why does everyone think that MVC frameworks are the right solution? I really only see two advantages:
1. It makes you organise your code in a certain way
2. You don't have to deal with mod_rewrite
The first point you should already have under control. You don't need a framework to keep things tidy. Why would I rather do regular PHP and keep things tidy myself? Because frameworks have you relearn everything you already know, and included in the extra layer of code there are all these assumptions that the framework authors thought were neat but which you only learn by hitting obstacles.
And if you really need a better solution than mod_rewrite, write your own, it's easy. And you don't even have to have it read from a configuration file: the mapping can be in source code.
Am I being narrow-minded? I've worked with Java for a number of years, mostly in web projects (Struts 1) or back-end code (connecting to DBs, services). I spent a summer designing a project to use Struts 2 and Spring (around 2008), and I've written my own MVC for PHP. I've tried CodeIgniter. And all this has just made me abhor MVC frameworks:
- The ORMs that we've known for decades cannot ever work
- The huge amounts of configuration files that people think exist because one day a client will request a change and all we'll have to do is change a few lines of configuration (like magic)
- The complete bewilderment when things go wrong (crappy or no error messages)
- The code generation
- Form handling and validations that are never quite right
- Poor documentation
Ruby or Python might be better than PHP, but surely MVC frameworks are not the solution.
Am I missing something?
"The language is as good as the developer using it" is a faulty argument. Read PHP: A Fractal of Bad Design for a good rebuttal.
Bít, zabít, jen proto, ze su liska!
Comment removed based on user account deletion
haha. i hate testing IA64.quite freakin unstable. sure people nowdays tough their pc is 64bit while it's actually ain't.
"The language is as good as the developer using it" is a faulty argument. Read PHP: A Fractal of Bad Design for a painful, pedantic and tedious rebuttal.
TFTFY
I am using the Ubuntu distro, how do I install it?
"The language is as good as the developer using it."
Exactly.
That's why PHP only has bad developers.