13 ms·
The new PHP
- ing33k 13y agosame article could have been written like 1 year also .
- d23 13y ago> It contains powerful new features and helpful developer tools, such as a built-in web server I haven't finished the article yet, but really? Is that what PHP needs? A built-in web server? It strikes me that adding more tools that incompetent web developers can abuse is what got them there in the first place. How long until we start having security releases for the PHP web server, because so many clueless devs decided to launch and run their site with it?
- JohnBooty 13y agoHaving a built-in web server was a tremendous boon for Ruby on Rails. Anybody could run "rails new foo; cd foo; rails server" and run code without installing Apache and mod_whatever. Regardless of what anybody thinks about Ruby developers, I've never heard or seen that "people launching production sites with servers intended mainly for Rails development use" is/was a widespread thing.
- Gigablah 13y agoWhat makes you think a "clueless" dev is going to find out there's a built-in web server in the first place?
- ajankovic 13y agoOr that dev is going to know what is web server.
- Iftheshoefits 13y agoHave you seen any WordPress code? There are a lot of "clueless devs" who stumble upon the most wretched, ill-advised features of PHP and happily (ab)use them. I have been under the impression that that was, in fact, one of the reasons PHP has such a bad reputation (rightly or wrongly).
- maratd 13y agoThe web server is explicitly for development purposes. It is not meant for production. > It strikes me that adding more tools that incompetent web developers can abuse is what got them there in the first place. This is profoundly ridiculous. It's the equivalent of saying Home Depot shouldn't sell power tools because some do-it-yourselfer might saw his foot off. Just because a tool can be misused is not an argument against it nor its inclusion.
- dd3141 13y agoThis. Can't agree more.
- mehwoot 13y agoJust because a tool can be misused is not an argument against it nor its inclusion. I used to believe this, but now I couldn't disagree more. People can and do misuse things all the bloody time, and the more you enable them to do that, the worse your tool is. How people use what you make is every bit as important, possibly even more important than the technical merits of what you make. I'd rather a builder use a second hand hammer to nail something than try doing it with a jackhammer.
- Karunamon 13y ago>People can and do misuse things all the bloody time, and the more you enable them to do that This is an excuse for educating people, not an excuse for kneecapping the majority due to an ignorant minority. This is the kind of thinking that plagues the GNOME3 devs and gets ridiculed so often around here. The user is an idiot so let's remove features. I don't see many people harshing on Rails for the inclusion of WEBrick.
- Freaky 13y agoRuby, you mean - it's part of the standard library.
- TeMPOraL 13y ago> People can and do misuse things all the bloody time and the more you enable them to do that, the worse your tool is. In terms of avoiding accidents I agree, but in general, I don't like this kind of thinking. One man's misuse is another man's hack. The flipside here is that the more you limit and subdivide a tool, the worse your tool becomes. I'd also rather see builder using something else than a jackhammer to nail stuff, but then I also want him to have access to one if he needs it, and I strongly want people to stop shouting "omg you can't use X to do Y, because X was not meant to do Y". First principle of hacking: tools do not have inherent purpose, they can be used to do whatever we want; they only can be better or worse at a particular task. The world didn't collapse into logical contradiction the last time I cut pizza with a sound card, because of lack of any other sharp tool nearby.
- robryan 13y agoIsn't that pretty much what people use with rails? No one says that is overkill.
- garethadams 13y agoHas PHP decided whether it's a language or a framework yet? EDIT: To clarify, a framework like Rails definitely has a place for including a web server. Now Ruby has a lightweight web servers in its standard library (but not its core library). Maybe the problem people are seeing with the web server (and it's not a new problem) is the way PHP's core library contains so many things that other languages would leave out as optional includes.
- kiiski 13y agoI think the problem is more likely to be that people here are so predisposed against PHP that they only see the potential problems, and ignore the benefits.
- shocks 13y agoUmm, like Node?
- courtewing 13y agoNot really like node, no. The node http module is part of the standard library and you can use it to build a custom web server. The php web server is built into the php binary, and you can use it to serve up some portion of your filesystem as a PHP app. So it's more like `python -m SimpleHTTPServer` than the node http module.
- userbinator 13y agoI don't think PHP needs a built-in web server, but for a different reason: there's already tons of others you can use with it.
- agumonkey 13y agoit's to isolate from system http server[1]. Before : Install php, write php, install apache / mod_php, refresh. After : install php, write php, refresh. Nothing else. [1] no need to install/configure a complex standalone server, focus on embedded thus more cohesive routing systems instead of fragile rule-on-top-of-regexps as seen in apache.
- girvo 13y agoConsidering the fact that I can set up a development environment in docker using PHP with a makefile and it's built in webserver, I'd say you've missed the point of it. It's a great addition, and with Composer/Packagist (which does currently have an issue with replacement packages, that needs to be fixed) plus the new features in 5.5, I can comfortably say I like using PHP. Also, I've really got to stop reading the comments on PHP threads here on HN. They're repetitive, pointless and negative to the point of blindness. I'll go back to building cool things in it (and Go and Ruby and lately C, because while each of those have their issues they all serve a purpose and do it well).
- debaserab2 13y agoWhat? How often does that actually happen? I don't think I've ever heard of new PHP devs "launching with the built in web server". Django has shipped with a built-in insecure web server for years and no ones crying to fix it. There's things to fix in PHP, but this is not one.
- awestroke 13y agoI sometimes ponder what I'd fix, given the chance, about PHP: * Make the "stdout == response body" an explicit option, and make a rendering engine the default instead. Just sending all output is a senseless DEFAULT. * Remove all the array_x functions and turn arrays into a class instead, and change the parameter order to be consistent across all the functions. A similar action could be done across many other classes of functions, too. * Tighten equivalence requirements, == should work like ===. * Etc. But I always realize I'd just end up with Ruby or Python, both of which already exist and have fantastic ecosystems. Oh well.
- Gigablah 13y ago> == should work like === Then why not use === ?
- awestroke 13y agoI know enough to use === when I program in PHP (even though I oftentimes forget) but newbies don't.
- aviraldg 13y ago>> but newbies don't ... and sadly constitute a large majority of PHP users.
- diggan 13y agoIsn't that true for all languages though?
- WiseWeasel 13y agoThey'll learn soon enough. It builds character.
- nkozyra 13y agoI think at this point simply removing critical, old bugs, unicode support and removing and/or restructuring the cruft of the standard library would be enough. Unfortunately, the biggest hurdle at this point is reputation. No full or dot release will change that.
- buovjaga 13y agoThis may be of interest to some: I did research and found out that 58 out of 67 web hosts in Finland either offer PHP 5.4 or 5.5 right now or at least starting from summer 2014 (5.3 EOL is in July). An increasing number of web hosts give their customers the ability to switch PHP versions (with .htaccess or some web interface). It seems this trend will speed up the installation of fresh PHP versions.
- thegoodlab 13y agoLet the hate begin
- mrcwinn 13y agoHa! It's a pendulum that swings in both directions, and I think people are moving on from wasting their time and energy complaining about PHP. Here's what I have learned. 1. Developers complain a lot, and that's a good thing. While it can seem unproductive at times and devolve into flame wars, the truth is you're not likely to choose this profession if you aren't curious and care about the right damn thing happening. It's just a byproduct of what it takes to be a good dev. We research, we understand, and then we want to stand by our opinions because of that research and understanding. But we can also get lost in that sometimes. It's important to have pragmatism in our toolbelt. At the end of the day, core maintainers or contributors make sure to cherry pick the best from those arguments. Pull requests are made. Merges happen. Things improve. It's not always pretty, but discourse is like that. 2. The world isn't perfect. Neither are languages. PHP has its share of rough spots, but then it's how you use it. We've all seen some truly awful Ruby on Rails code, just as we've seen some solid, testable PHP code. Your job is understand the deficiencies of a language (any language!) and craft the best code around those limitations. 3. Shiny new things give us blinders. The antithesis to ad hoc PHP might be Ruby on Rails. Yet people discount some drawbacks that are unique (from PHP) to RoR. Do generators, which are encouraged, really help teach a programmer about how their application stack is operating? Maybe you could tell someone to avoid scaffolding. Is Rails faster than well-architected PHP? Hell no, but maybe you could teach someone how to tweak middleware or use JRuby. But you'll notice the same pattern I mentioned in #2: understand deficiencies, create workarounds to those limitations. It's not unique to PHP, or any other language/framework. And finally... 4. When you are building things meant to be consumed by the general public, more goes into a language decision than the features of that language. You might, for example, have a business requirement to hire up and move very quickly. Are you going to round up a bunch of seasoned, veteren Go engineers in a few weeks to build the next sprint of some great app? It's probably not impossible, but it's not likely either (today). The trick is to solve the problems you actually have. I'm not advocating everyone use PHP. I'm advocating everyone use the language that best suits their personal or larger business needs. If you care about improving PHP, help make it better. We, the general dev community, are all too busy, considerate, awesome, hard-working, friendly, and creative to spend much time on flame wars. :)
- lukeholder 13y agoAll this is very true. Modern PHP is not the PHP of yesteryear. With Composer for dependancy management and sticking to the PSR's you can build very stable, testable, and modern applications that change minds about PHP.
- ohwp 13y agoWith previous versions very stable, testable and modern applications could be built as well. Things like object type hinting can help building stable apps but imho it is still the work of the programmer that can break or make it.
- xr09 13y agoThe thing is you have to be a medium-to-expert to be confident about Composer dependencies, every new dev is going to use the language API, which resembles a bunch of functions with no general pattern. PHP users need to keep it together and set a common base, a standard library with sane defaults.
- rubiquity 13y ago> generators for simpler iteration, namespaces, and variadic functions and argument unpacking. With PHP 5.4, traits were introduced (a la Scala or Perl) to allow code reuse in single inheritance languages, as well as closures, which allow you to code PHP in a functional style. "The new Java" It's good to see PHP maturing. However sometimes the most important features of a language are the features you don't add. I think PHP would do itself a big favor by cleaning up its main APIs and standard library first. Maybe they will do that in PHP 6, since I doubt they want to break APIs in minor releases.
- eugene-d 13y agoCleaning up main API or similar vast changes may and probably will be a disaster for PHP. We all know a bunch of examples from other languages.
- nikic 13y agoPHP has a rather strict no-BC-break policy for minor releases. As such the 5.x series improves the language mostly through additions. I think that's good. PHP has been missing a number of things that are now present. However that doesn't work forever, at some point you need to clean up some of the old stuff. That's why a PHP 6 release is planned in the near future (i.e. somewhere in the next three years ^^).
- uxp 13y agoThe very first programming book I bought was "PHP6 and MySQL5" by Larry Ullman. I bought that one specifically because I had another job (career, really) and I knew it was going to take a while before I really got into programming and I didn't want to buy a book that was going to be out of date in 2 years. That book is now 6 years old, out of date, and PHP6 is still not released. Maybe 6 is just an unlucky number with Perl unable to make that goal as well, but either way I'm not holding my breath. I've since moved on to more well thought out languages, though PHP keeps pulling me back in. I'm currently having to support a CI app that hasn't had a line of code added to it since 2008, and the only thing I can say, even though I appreciate the language and how far it's pushed the web, I'm glad it's no longer my go-to language of choice. Keep PHP5 around for a while so apps like this one can continue on, but PHP6 is _LONG_ overdue.
- foosui 13y agohttp://phpthegoodparts.tumblr.com/ http://phpthegoodparts.tumblr.com/
- mordae 13y ago> Here's a rule of thumb: If the O'Reilly company publishes a book called "<blank>: The Good Parts" the thing that's in the <blank> is evil!. -- Matthew Butterick, RacketCon 2013 http://shop.oreilly.com/product/9780596804381.do http://shop.oreilly.com/product/9780596804381.do
- Jgrubb 13y agoI'm a Drupal dev by trade, and I consider any day that I don't have to get into the guts of Drupal and write PHP a good day. Recently, however, I had to get in there. This was a few days after I upgraded my local environment from 5.3 to 5.5. I've been writing Ruby for fun for a while now, and I love how I almost never have to look API related questions up, at least in comparison to PHP API questions. So I just wrote some PHP without looking up whether it was going to work, and it worked, first try. That rarely happens. Then I pushed it to dev, which is still on 5.3, and took the (dev) site down. Turns out the feature "array function dereferencing" is not available in 5.3, so I had to rewrite my code a little bit. Point being, I could see myself liking PHP more when we move to 5.5 in all our environments.
- SDGT 13y ago> I don't have to get into the guts of Drupal and write PHP a good day. I'm a Drupal dev at my day job, application dev at home. I love getting into my codebase for my sidejob, but D7 is awful under the hood. PHP isn't what makes it messy, it's the procedural hook system. And yes, PHP 5.5+ is awesome to have.
- girvo 13y agoI did the same job for 6 months. I really like PHP nowadays, but Christ Drupal core is a mess (or was, that was v6).
- codygman 13y agoIf I may ask, what other languages do you have experience with and what are your opinions of them?
- girvo 13y agoRuby, extensively. It's enjoyable and quite useful. Meta programming makes me think of Lisp, but need to be careful of side effects. Go, recently I've been using it for certain services and APIs. Really great for concurrent programming for services, syntax is nice too. Python, I've used a few times over the years and have used it with personal projects a number of times. Still like python quite a bit. (Bonus: nimrod, which I'm helping build a new type system for, Clojure and Scala I've played with extensively but never had a chance to use in production, and C/C++/Vala I've used when doing desktop programming on Linux for Elementary)
- nikic 13y agoWhile the gist behind this post is right, the article contains a number of factual errors. E.g. the version numbers in the "language features" section are pretty messed up: * Namespaces, closures and FPM were already in PHP 5.3 * The built-in web server was already in PHP 5.4 * Improved variadic functions, argument unpacking and phpdbg will be in PHP 5.6, which goes to beta in about a week.
- codeguy 13y agoHi nikic. Thanks for the feedback! (I'm the author of that article). The O'Reilly editors made a few changes to the wording without my review that make it more ambiguous as to what features were introduced in what version. I agree as is it can be confusing. But the point is that the latest version of PHP provides all of these features. The variadic function statement was an error on my part and it has since been corrected in the article.
- anaphor 13y agoDo you really think tacking on more badly designed features makes PHP better? PHP's "closures" require you to write down the free variables in an enclosed function and tell PHP that they exist, that is something a compiler should be doing. Google "closure conversion".
- Kiro 13y ago> PHP's "closures" require you to write down the free variables in an enclosed function and tell PHP that they exist Can you give an example? I googled "closure conversion" but didn't understand.
- dmiladinov 13y agoIn order to use variables from the scope that the anonymous function came from, you have to explicitly import them into the anonymous function with the use[1] block: public function getTotal($tax) { $total = 0.00; $callback = function ($quantity, $product) use ($tax, &$total) { $pricePerItem = constant(__CLASS__ . "::PRICE_" . strtoupper($product)); $total += ($pricePerItem * $quantity) * ($tax + 1.0); }; array_walk($this->products, $callback); return round($total, 2); } In other languages that have true closures, the anonymous function "closes over" the lexical scope in which it was declared. [1]: http://www.php.net/manual/en/functions.anonymous.php http://www.php.net/manual/en/functions.anonymous.php
- ck2 13y agoI don't see any mention of the "new" zend opcache which has great performance.
- eddd 13y agoI don't get it. Why people can't just admit the fact that PHP had his time and now, no one with common sense would not start new project (except simple wordpress stuff) in PHP.
- lstamour 13y agoFacebook, blogs and open source enterprise CMS would disagree with you.
- jbeja 13y agoFacebook doesn't even use PHP anymore, they switch to their own implementation of PHP called Hack to runs on HHVM. So no, they don't use PHP per se for anything this days. http://www.infoq.com/interviews/adams-php-facebook http://www.infoq.com/interviews/adams-php-facebook
- JohnBooty 13y agoThey're very much using PHP (the language) ...they just made their own runtime. They still sit down and write PHP. They don't sit down and write HHVM code. That's like saying a company no longer uses Ruby because they use JRuby now.
- fixedd 13y agoIn the video on that page he specifically says that if you're writing software at Facebook you're probably doing it in PHP or C++.
- userbinator 13y ago> no one with common sense would not start new project (except simple wordpress stuff) in PHP. Is that really what you meant?
- cweagans 13y agoIn most enterprise environments, you have your choice between .NET and PHP. Given the option, I'll take PHP, thanks.
- stevoski 13y agoI often wonder why a PHP killer hasn't yet been created. I don't mean a Ruby or another vastly different language. I mean a language similar in approach to PHP, but with the gotcha's removed, some order and consistency introduced into the API, and a few changes to the defaults. Open source, free, and on all major OS's.
- eddd 13y agocheck what PyPy did (or is doing with PHP).
- dagw 13y agoDo you mean HipHop?
- uolot 13y agoCould you please explain it a bit or provide a link?
- chrisguitarguy 13y agohttp://morepypy.blogspot.com/2012/07/hello-everyone.html http://morepypy.blogspot.com/2012/07/hello-everyone.html > I'm proud to release the result of a Facebook-sponsored study on the feasibility of using the RPython toolchain to produce a PHP interpreter. The rules were simple: two months; one person; get as close to PHP as possible, implementing enough warts and corner cases to be reasonably sure that it answers hard problems in the PHP language. The outcome is called Hippy VM and implements most of the PHP 1.0 language (functions, arrays, ints, floats and strings).
- uolot 13y agoThanks, seems very impressive
- acomjean 13y agoHipHop its Facebook sponsored just in time compiler for php. HHVM (Hip Hop Virtual Machine). My understanding is its 95%ish compatible with most php. They're working using framework unit tests to get the percent higher. http://www.hhvm.com/frameworks/ http://www.hhvm.com/frameworks/ https://github.com/facebook/hhvm https://github.com/facebook/hhvm
- deleted 13y ago[deleted]
- shubhamjain 13y agoWhenever I hear "the new PHP" or "its not the old mess anymore", I say to myself, thats hardly the point. The key flaw I find with PHP is with its community and lack of any mature frameworks. Half of the PHP coders are hopeless script kiddies, thanks to low barrier entry it has, and I don't feel a single framework exists that can match Rails or Django. For the matter of fact, the framework with largest community, Codeigniter, only has inline test functions for any kind of testing and doesn't even come with a auth library. Being a PHP developer myself, I can't refute that only selling point of PHP, albeit, a major one, is its so "easy" to get things done. I feel in the near future, with advent of tools to make mature frameworks more accessible, PHP would cease to be a tool for any serious web development.
- ThomPete 13y agoWhy isn't that the most important selling point of most languages? The cases where PHP is not appropriate seems to often be known before going into it (with notable exceptions like Facebook of course) but thats a success problem not a fundamental problem with PHP. In 95% of the cases PHP seems to be exactly the best possible, easiest to get up and running, versatile for web based programming.
- webjprgm 13y agoI agree on the point of frameworks. I don't like any that exist so I made my own Rails-inspired one. Unfortunately this means I prefer not to do consulting jobs in PHP because it's considered bad practice to use a framework that no one else knows. (Mine has dynamic ORM (reads db schema), a console (REPL that loads project config and autoloader file), and similar project layout. Recently added REST API system that generates MD and HTML documentation at /path/to/project/help/.) Anyway, I would say the main selling point is ubiquity. Every cheap host I've seen people (clients and semi-technical friends) use supports PHP. It often takes more work to get a Ruby project running on those hosts. Or worse for a Node project.
- canweriotnow 13y ago> I agree on the point of frameworks. I don't like any that exist so I made my own Rails-inspired one. With blackjack and hookers? Please say with blackjack and hookers.
- antocv 13y agoPHP is and will always be the choice of script kiddies and freelances looking for a quick small buck. Because it suits and is made by that niche, copy-pasted "solutions" and monkey-ing others, just as the latest versions of PHP try to monkey other language and framework thinking, shows a profound character of its community, monkey-patches thrown together to look like some thought was put into it. It is not the language of the future, its not where inventions happen. Its still the same old to its core, pieces cobbled together to look like something it isnt, trying to hide the inconsistencies in its core.
- Nodex 13y agoAnd yet here you are ranting how bad it is? Let me guess, a node / python hipster?
- mjt0229 13y agoTL;DR: "sucks less?"
- hmans 13y agoThe title is misleading; I expected an article about Javascript.
- spoiler 13y agoI used to write PHP before I got into Ruby. I'm glad PHP is getting it's shit together, but it's still a no-language for me.
- dscrd 13y agoHere's what would make me accept PHP as passable practical web programming language: A good REPL, with good support for it over all frameworks. That's all it would take. Given that it doesn't have one, python beats it easily.
- indeyets 13y agoYou mean like boris? https://github.com/d11wtq/boris https://github.com/d11wtq/boris
- dscrd 13y agoLooks good, but here's the practical question: Can I enter this REPL with all the libraries and models of my web framework loaded so that I can query a model through it, modify the object and save?
- oinksoft 13y agoNo more than you could with any other execution environment. Autoloaders should find your libraries if you are using the same entry point, and you can query a model as you could in any other language. It looks like people have made something like this for CakePHP: http://josediazgonzalez.com/2013/12/04/interactive-command-line-repl/ http://josediazgonzalez.com/2013/12/04/interactive-command-l... And there are some REPLs with tab completion: https://github.com/ErikDubbelboer/php-repl https://github.com/ErikDubbelboer/php-repl
- indeyets 13y agohttps://github.com/d11wtq/boris#using-boris-with-your-application-loaded https://github.com/d11wtq/boris#using-boris-with-your-applic...
- kayoone 13y agoIt really pains me that there are so many utter misunderstandings about modern PHP from people that used it years ago and have no clue about the current landscape, even in this thread. Yes, the PHP core api is still a bit messy due to backward compatibility, but everything else it pretty awesome really. Please take a closer look if you haven't touched PHP in years, before you talk it down.
- jaequery 13y agoi think most of it has to come from Wordpress' dominance over PHP applications. and we all know how much of a mess that is.
- fleitz 13y agoOh, did you mean PHP the language? The webserver? The FastCGI server? The runtime? PHP starts as a fucking mess and gets worse. Maybe once the developers figure out what it is I'll take a look but yeah it's pretty much the developers taking standard features from other languages and fucking them up just like they did yesteryear. Closures with a use block... even in C you don't have to do that... it's a joke and a mess... How is it that a 44 year old language has better features and less cruft than one 15 years old? Does it have a ==== operator yet?
- KingMob 13y agoYeah, the functional programming side of PHP is ugly as sin. Forgot to add your latest variable to the use block? No "closing over" for you. What's that? All array function are prefixed with "array_"... except for the old ones which aren't, making it both verbose and confusing.
- ExpiredLink 13y ago"Taking PHP Seriously" by Keith Adams (Facebook): http://www.infoq.com/presentations/php-history http://www.infoq.com/presentations/php-history Usage of server-side programming languages for websites: http://w3techs.com/technologies/overview/programming_language/all http://w3techs.com/technologies/overview/programming_languag...
- zaphar 13y agoNothing in that article fixes the issues that make PHP unpalatable to me. They are all new features added to the current broken set. Even if they are new and shiny they don't make the rest of the language suddenly better. Which is really kind of the problem with PHP. All of that broken stuff was allowed to be broken for so long that it's effectively impossible to fix it. All you can do is layer on more features.
- nideone 13y ago> If you have bypassed PHP for alternative languages, or if you are a PHP veteran unaware of recent changes, you owe it to yourself to give PHP a second look. I remember PHP as I would imagine one would remember child molestation and you're asking me to give him a call and apologize? No.
- anaphor 13y agoPHP's "closures" are basically you the programmer calculating the free variables in an enclosed function and then telling PHP you want them to be bound in an environment. I would laugh if it weren't so pathetic.
- hiphopyo 13y agoLove the way they avoid mentioning Rails.
- e-tron 13y agodoes anyone actually use rails anymore... node is the new bling!!!
- pearjuice 13y agoWhat I don't comprehend is how someone can know of all this and then still stay "you know what? fuck namespaces and PSR, we are doing it old school!" and come up with arguments like "I/O overhead is costly in one class per file scenarios"[0]. These people will be the death of all of us. [0] https://www.sellvana.com/blog/on-composer-psr-and-namespaces https://www.sellvana.com/blog/on-composer-psr-and-namespaces
- dpeck 13y agoSame as the old PHP.
- callesgg 13y agoNever go full retard.
- hashberry 13y ago"There are only two kinds of programming languages: those people always bitch about and those nobody uses." -- Bjarne Stroustrup
- cies 13y agoThe article compares PHP now to PHP in the past. But programmers should not do this, they should compare PHP to other languages and their ecosystems, and conclude that it is not fit for a greenfield project. The new libs'n'tools are nice; good to see them showcased. But the bottom line for any developer should be to avoid it --like Perl-- for any from-scratch code. This is a legacy language now.
- elwell 13y ago> The memory usage in PHP 5.5 is far less than earlier versions. Regarding Zend Engine, does anyone have a link for just how much 'less'?
- pippy 13y agoTo me the criticisms about PHP are pedantic and is a result of misunderstanding the philosophy behind PHP. The kneejerk reaction language modifications the PHP community made because of the 'PHP sucks lol' meme is detrimental to the language itself. PHP is a mature webdevelopment language that features an easy to learn, read, and develop feature set. Scala or Perl are not. (See Perl 6) So I don't see how emulating it will provide any form of benefit. Picking up a language feature because a guru attacks PHP because they can write a feature X in Y lines is almost an immature. The reusability and performance issues were genuine, but these were to be expected given version iterations and the fact PHP introduced namespaces a while back.
- JackMorgan 13y agoI think most people don't really compare PHP to Scala: it is an entirely different language. I think most people who talk down about PHP do so because Python and Ruby are so much easier to understand and use. But then again I'm of the unpopular opinion (having worked professionally in all four) that Perl, PHP, Python, and Ruby should go into a cage, and only one should emerge. The others must write converters that turn their code into working code of the winner's, and we should stop having four languages that are basically all fighting over the same dynamic scripting language mindshare. Imagine if instead of worrying about "keeping up with the Rail's" you could just think about how to actually work on converting those Java/Haskell/Lisp programmers!