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.
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..
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.
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!
All of the complete and utter shit that is the language called PHP and that is your argument against it?
Yeesh.
Yes, why NOT rewrite the entire language tokenizer for vague reasons of potentially avoiding a single keystroke?
It's better to vote for what you want and not get it than to vote for what you don't want and get it.
- E. Debs
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.
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).
You know a vast majority of them are not needed? Have you ever written a parser? I could see these things helping a lexer a great deal.
The CPython folks constantly moan about parser complexity, and even they managed it.
Yah, they were really great in BASIC!
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.
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?
if token.type == TOKEN_TYPE_STRING {
if keywords.contains( token.value ) {
handle_keyword(token);
} else {
handle_variable(token);
}
}
There are 0x40000000 types of people: those who understand 32-bit IEEE 754 floating point, and those who don't.
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
"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
im guessing javascript somehow doesn't qualify? lol
How many server-side PHP projects don't rely on a bit of Javascript client-side?
In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
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.
To be fair, one of the arguments for dynamic languages is less code needs typing because type conversion is handled automatically (some of the time).
With PHP all that's undone by the fact you're typing unnecessary extra $ signs everywhere and having to use === instead of == half the time. If you've got those extra keystrokes all the time then what exactly is PHP's advantage again? It doesn't have any.
So there is a fair argument against it even if it was a single keystroke (it's not, it's a shift+keystroke).
class functor { void operator() { } } n; n(); Is n a variable or a function? how about int n(5); A nice little constructor call. Love the most vexing parse. I believe using a $ would simplify a design, but not still not necessary.
Is it a variable or is it a function call?
I am not talking about going back, I am talking about them simplifying a design that already exists. I would not write a compiler personally that needed it.
I do love the "design" in quotation marks, they actually thought using a left associative ?: is acceptable? I think they are mad.