3 ms·
It looks $ugly, $code is read more $often than its $written. This $ everywhere hurts the eyes. Its syntax is bad and inconsistent, before 5.4 you couldnt have
by antocv 13y ago
It looks $ugly, $code is read more $often than its $written. This $ everywhere hurts the eyes.
Its syntax is bad and inconsistent, before 5.4 you couldnt have a function return an array and call it and access array contents like this funcName()['blah']. What the.
PHP only has one data type for structures, array, which in various ways pretends to be every data type, stack, queue, tree, hashmap, list, fuck it all, lets just call it array everywhere!
Anyway, everything else is implicitly converted as well, strings, integers, fuck it all, lets ouput 0 or 1 who cares.
PHP is basically not a language, its a clusterfuck of copy-pasted code everywhere, I bet its runtime, Zend, is as a copypaste of various C-libraries cobbled together.
I feel sorry for all the PHP lovers, must be stubborn ones, just like VisualBasic people 10 years ago when it was dying. PHP-lovers have the same argument now as VisualBasic did 10-15 years ago.
EDIT: Where and when I would use PHP. Never. There is always a better alternative. This talk about how easy it is to host, blah blah, then you never had to compile php and set its config flags and include dumb oci8 modules, pear or pecl files or whatever, or see it fail and no logs anywhere but you have to have system-level access to some ini files. Ugh... I think people have just learned to live with that crap, and the more sane languages and web frameworks like Flask or Grails are much easier.
- brianpgordon 13y agoZend is, indeed, infamously a mess. HipHop is supposed to be better. https://github.com/facebook/hhvm https://github.com/facebook/hhvm
- dan15 13y agoYeah, Hack for HHVM adds a bunch of stuff to PHP to make it better, including: - Collection classes like Vector (which is like an array in every other programming language ever) and Map (associative array or hashtable) - Generics - Lambda functions - Asynchronous functions - Type hinting for intrinsic types (int, string, bool) Not much public documentation yet, but most bits are in the open source HHVM release, and there are a few blog posts on it (eg. http://www.sitepoint.com/hhvm-hack-part-1/ http://www.sitepoint.com/hhvm-hack-part-1/)
- jasey 13y agoOne advantage it does have is apps can auto update and extend themselves. Eg, wordpress makes extending it with 3rd party plugins extremely painless from a user perspective. As for not being able to access a array directly from a function which returns the array. It's just syntactical sugar. Yes long over due syntactical sugar however.
- antocv 13y agoWhats that got to do with the language? Autoupdateing can be implemented in VisualBasic as well.
- coldtea 13y ago>It looks $ugly, $code is read more $often than its $written. This $ everywhere hurts the eyes. As much as Lisps parenthesis everywhere do.