HN2new | past | comments | ask | show | jobs | submitlogin
PHP in 2019 (stitcher.io)
5 points by UkiahSmith on May 13, 2019 | hide | past | favorite | 3 comments


While I mostly agree, I think the PHP world it depicts is too rosy. The language itself is a bit chaotic and its enhancements are often half-baked.

For exemple, PHP5 introduced type declarations for functions, but only for arguments and custom types (object classes). PHP 7.0 extended these declarations to return values and internal types[1]. But having nullable types was implicit and restricted to some arguments and forbidden on return values, so PHP 7.1 had to introduce a new explicit syntax[2]. Now there are two ways to have nullable typed parameters, and, outside of the migration notes[2], only the old one (incomplete) is documented.

The post is right about the performance of modern PHP, but in the same time it advocates the use of the most prominent frameworks, which are rather slow. While Yii2 or CodeIgniter have a 20% overhead over raw PHP, Laravel and Symfony have a 80% overhead, i.e. 5 times slower[3]. YMMV, of course.

Composer is not mentioned in the post, though its main source is (Packagist). I think it has largely contributed to the better PHP ecosystem. Having worked recently with Python, I was frustrated by their lack of a similar standard tool.

[1]: https://www.php.net/manual/en/functions.arguments.php#functi...

[2]: https://www.php.net/manual/en/migration71.new-features.php

[3]: https://www.techempower.com/benchmarks/#section=data-r17&hw=...


I agree, I think the PHP community wants this to be successful, and is looking with rosy thoughts. But I find it hard to blame them. PHP paid my salary for a long time. It's got a few issues as a technology, but it gets the job done. I can see how the PHP community would look forward with hope.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: