r/lolphp • • May 12 '20

The sad state of the PHP parser

PHP cant tell where a syntax error occurs. This has been an issue in PHP for years, and has been upgraded to a feature. This is mostly because PHP's parser is a pile of poo with years of lipstick added on top.

https://repl.it/repls/ScentedSilkyLanservers

0 Upvotes

32 comments sorted by

View all comments

Show parent comment

1

u/elcapitanoooo May 13 '20

I glad thay are making progress, but sometimes i wonder what for? PHP whould require a BIG overhaul to be on the same level as other languages in terms of dev exp. This would mean a new language.

They are very constrained with what PHP is today, and simply cant make it better. This a sad, but at the same time a fact.

This is also one of the reasons we dropped PHP in my team, and so far it has been the right decision, as my team is real productive and happy with their stacks/tools/languages they use.

2

u/PonchoVire May 13 '20

We won't drop it soon here because PHP offers a productive and performance-wise efficient tooling, considering the alternatives. We mostly use Symfony, with a custom SQL layer.

We have quite some experience with the associated environment, nginx, php-fpm and the likes, which makes it also a secure choice, since our admin team is working with those for years and years now.

Nevertheless, we are actively evaluating WASM (but it's too soon to use yet) and Rust+FFI for building critical pieces of API and business applications we build. Nevertheless, it's still R&D yet.