With the recent discussion on the origins of PHP function names, and about what, if anything, can be done to fix PHP without ruining it...I'm curious about what happens at Facebook. Besides HipHop, do they maintain a strict PHP style among their developers? Even if HipHop can handle all of PHPs variations, I imagine there's time saved by writing optimally-designed (for the human) code, too?
Yes, they have a static analyser for PHP, Hack, written in OCaml http://www.youtube.com/watch?v=gKWNjFagR9k
HipHop VM: now at 98.5% PHP framework parity, 16% faster
41–50 of 112 posts
Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster
#42I wonder how hard it would be (for me) to take php and change all function names to be consistent. All PascalCase and spelled out (no awful abbreviations). Then download the documentation and change it there as well.
e.g.
function findFirst ($haystack, $needle, $before_needle=false, case_sensitive=false) {
if (case_sensitive) {
return stristr($haystack, $needle, $before_needle);
}
return strstr($haystack, $needle, $before_needle);
}
You can submit them as RFC to https://wiki.php.net/rfc and maybe your suggestion end up in a future version of PHP. As PHP code in HHVM is almost as fast as C++ code, your wrapper functions will be still useful for you in the meantime.Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster
#43I see a lot of familiar frameworks and CMSs except one. Wordpress. Any idea why Drupal and Joomla would be listed without WordPress?
Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster
#44With the recent discussion on the origins of PHP function names, and about what, if anything, can be done to fix PHP without ruining it...I'm curious about what happens at Facebook. Besides HipHop, do they maintain a strict PHP style among their developers? Even if HipHop can handle all of PHPs variations, I imagine there's time saved by writing optimally-designed (for the human) code, too?
For core language features like that, there really is no way to "fix" it. Just pick a better language.
Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster
#45Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster
#46I wonder how hard it would be (for me) to take php and change all function names to be consistent. All PascalCase and spelled out (no awful abbreviations). Then download the documentation and change it there as well.
Ahh yes, take the most criticized aspect of Java -- the obscene verbosity -- and cram it into PHP. Sounds wonderful.
Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster
#47Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster
#48I see a lot of familiar frameworks and CMSs except one. Wordpress. Any idea why Drupal and Joomla would be listed without WordPress?
Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster
#49Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster
#50I wonder how hard it would be (for me) to take php and change all function names to be consistent. All PascalCase and spelled out (no awful abbreviations). Then download the documentation and change it there as well.