8 ms·
How the first PHP functions were named
- neals 13y agoYes, PHP has some odd function names. We know. Move on already.
- mseepgood 13y agoPHP has a ton of oddities: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...
- awestroke 13y agoWhy should people move on? I want people to be educated in how horrible PHP is, I want to see PHP burn and be abandoned.
- swansw 13y agoSorry to break it to you but that's simply not going to happen (at least anytime soon). Why not direct your effort at improving the language instead? Edit: I'm not necessarily disagreeing with you but I just want to know what your reasons would be to see it die rather than be improved.
- mgkimsal 13y ago"Why not direct your effort at improving the language instead?" Or indeed developing a successor. Loads of people bitch about how bad PHP is - I see very few efforts to even come up with a better alternative.
- mjburgess 13y agoThey already exist (python, ruby, ...). Improvement is the only way the PHP commuity as the php community will progress.
- berkes 13y agoSadly, for that PHP-community, many developers outgrow PHP and move on. Instead of the developers growing and improving, and so pulling the entire community upwards, many simply choose to leave. I've had this personally with Drupal: many, many years did I poor a (joined!) effort into getting proper TDD, OOP, deployment strategies into this CMS, but in the end I gave up. I mean: why put effort into making Drupal something it does not want to be; while a few weeks of learning a new language, the thing I wanted Drupal to become, already exists. I think PHP is mostly a station in the career of many webdeveloper, before they move on to what are often considered "more professional environments". Sure, there are a few brilliant and very professional PHP-devs who stick around. But relatively seen, they are a tiny minority.
- userbinator 13y agoInteresting trivia I've wondered about (like "why are the registers in x86 named in A, C, D, B order), not really any issue though; you memorise them just as well in any case if you work with enough code.
- phaemon 13y ago> why are the registers in x86 named in A, C, D, B order Umm...they're not. Who names them in that order?
- userbinator 13y agoIntel does. http://code.google.com/p/corkami/wiki/x86oddities#register_order http://code.google.com/p/corkami/wiki/x86oddities#register_o...
- phaemon 13y agoAh, Ok, I did not know that. You learn something new every day. Thanks!
- choult 13y agoRasmus created PHP for his own benefit to begin - how was he to know back in 1994 that it would grow to power so much of the web? We all make mistakes; we all learn from them. Lets move on. Of course, noone in this day and age would make any dodgy design decisions... would they? http://www.chmod777self.com/2013/08/sigh.html http://www.chmod777self.com/2013/08/sigh.html
- goldenkey 13y agoThere's nothing wrong with the code that Node uses for HTTP verbs. It's optimized to do a single byte comparison where it needs to, the code is taken straight from nginx which is brutally optimized. You want speed, you got it.
- choult 13y agoWhile it's true that the code in question was taken straight from nginx, if you bothered to read the NodeJS implementation (pre-fix, and referenced in my link) you would see that a secondary check against the full verb (that nginx performs further down the line) was not included. Hence you could GEM a page or PUN an object. I'm not sure I want a codebase that's "brutally optimized" to the extent that it's not functionally equivalent. EDIT: Used "functionally equivalent" as a more proper phrase than "idempotent" after the below feedback
- goldenkey 13y agoDon't use the word idempotent. One of my pet peeves is use of higher level vocabulary in the wrong context. Nothing is being applied multiple times. And the optimized code is a beast of its own, it's not an 'optimized' operation on a normal piece of code. The code simply does not perform the same rigor as slow, spec-following code would.
- growse 13y agoThe problem isn't making mistakes. The problem is not correcting them when you've learned they are a mistake and have had ample opportunity to do so.
- todorstoyanov 13y agoAccording to this stats: http://w3techs.com/technologies/history_overview/programming_language/ms/y http://w3techs.com/technologies/history_overview/programming... PHP has 80% market share and growing. There must be some other advantages over this badly picked function names. But if we talk about disadvantages, me personally do not like WordPress because of its slowness.
- romanovcode 13y ago>There must be some other advantages over this badly picked function names. Very easy to learn
- berkes 13y agoI'd always argue against this. Python is, by far, easier to learn. Python was, after all, designed as a language to teach programming. The issue is, that people often compare apples and oranges here: Good, SOLID, and well-architectured OOP PHP applications (YII, Zend) are far harder to learn then Django or Rails. It is unfair to compare the "hacking of a free WordPress theme" to "setting up and deploying a full MVC application in Rails". When you compare similar stacks, PHP is, nearly always, the harder-to-learn choice. A simple, hacked-together sequential script serving a webpage is, by far, easier in both Python and Ruby then in PHP. If only for the fact that both Python and Ruby come with decent, built-in webservers. PHP has gotten this in the latest release only, but before, a fair comparison would be: a PHP app requires you to erect a full LAP-stack, whereas a python-script could be serving pages on the most barebone machine with Python installed. Again, the very beginning of PHP might seem easier to learn, because in practice, a lot of the infra is there and a lot of groundwork is already done (LAMP-stacks come for almost free; Passenger or Fastcgi not so much, allthough they are there). And then, when going a bit further then "removing these two menu-items in a WP-theme", when moving into the area of proper designed, maintainable webstacks, PHP is a lot harder to learn. And when moving one step further, e.g. including stuff like asyncronous workers, long-running-threads, commandline-tools, and so forth, PHP is often even completely unable to cope, but in the very least, proves a really hard and cumbersome tool.
- itafroma 13y agoNote the original source of the screenshot was posted to Hacker News a few days ago: https://news.ycombinator.com/item?id=6919216 https://news.ycombinator.com/item?id=6919216 It has since spread like wildfire. This appears to be simple blogspam (tumblrspam?) of that.
- alphadevx 13y ago1. Write a blog post about how horrible PHP is. 2. Instant up-voting on HN. Yay traffic! 3. Profit! Full credit to the underpants gnomes: I couldn't have done it without you guys.
- easy_rider 13y agoAnd while PHP has been screaming to its community to "CHECK ALL INPUTS SDGY&F⁴8943%#$%#" and then we have the Ruby guys coming along, butthumping Rails and mass assignment fests. Name a perfect language/framework?
- ErikAugust 13y agoI find the inconsistency of the ordering of parameters in core PHP functions to be more frustrating than the names of them. Either way, I guess I have to agree that people are spending a lot more time than necessary referencing php.net. But then again, no need for all the anger and rage. There are a lot of things in the World much worse than PHP. There are things that are horribly wrong and yet still ubiquitous. Go fight racism, not web programming languages.
- pete_b 13y agohttps://twitter.com/rasmus/status/413669330216185856 https://twitter.com/rasmus/status/413669330216185856 No such thing as bad publicity?
- jimhart3000 13y agoWhen I was visiting my brother for Christmas last year, my 14 year old nephew told me he was interested in coding and really wanted to learn Java and PHP. My reaction was "you clearly don't read Hacker News".