5 minuted:
Something like Hack needed to be done, but also to completely disregard the whole execute entire script on load concept. It needs to go. If you have an actual application that responds and can manage it's own variables that will inherently perform much better because on top of it not having to constantly compile code it simply runs the relevant sections of code that a programmer can designate. Something like
apologies for the formatting but I wrote it in this editor. It's not pretty (and not necessarily valid PHP because I haven't touched PHP in a while) but it's not unachievable and you probably understand what I mean. Use non-blocking IO for the write stuff (hence why it calls a method instead of returning a response). You could even alias $response->write to something, but that model of programming needs to happen because at the moment PHP does not scale well. HHVM is a gigantic hack that fixes that issue for Facebook, but it's not entirely practical right now and it's not part of the official PHP stuff. I'm not taking anything away from HHVM, I'm just saying that it has to deal with that stuff for compatibility.
PHP needs to have a request / response system with a half-decent standard library, otherwise it will continue to suck, period.
You could even adopt HHVM and apply those principles to it, and it would be significantly better. Also, disable arbitrary string stuff in the MySQL(i) modules and only allow prepared statements and make a HUGE deal about how important they are.
Something like Hack needed to be done, but also to completely disregard the whole execute entire script on load concept. It needs to go. If you have an actual application that responds and can manage it's own variables that will inherently perform much better because on top of it not having to constantly compile code it simply runs the relevant sections of code that a programmer can designate. Something like
Code:
<?php class my_application : web_handler { function handle($request, $response) { $response->write_head(200); // 200 by default, this is just an example, the write method could detect if the header was written and if not it could write 200 automatically $response->write("HI, YOU SENT THE POST PARAMETER" . $request->post["post_parameter"]); // if the request is still open the server could close it after it returns } } ?>
PHP needs to have a request / response system with a half-decent standard library, otherwise it will continue to suck, period.
You could even adopt HHVM and apply those principles to it, and it would be significantly better. Also, disable arbitrary string stuff in the MySQL(i) modules and only allow prepared statements and make a HUGE deal about how important they are.
Comment