3 ms·
I haven't used PHP in around 6 years (running PHP 4 I belive); has the language improved ? My biggest complaint was that the API was incredibly inconsistent, b
by tombert 8y ago
I haven't used PHP in around 6 years (running PHP 4 I belive); has the language improved ? My biggest complaint was that the API was incredibly inconsistent, but that seemed like it could be improved in later versions if they weren't afraid of breaking backwards compatibility.
- ok_coo 8y agoIt has improved a lot in that time and I find it decent to work with now that there's decent dependency management with Composer and a good Rails-like framework in Laravel.
- kminehart 8y agoThere have been a number of improvements in the latest PHP versions, especially in terms of performance. There's still artifacts of past PHP versions that are there, though, which makes it far less nice to use than something more modern.
- duiker101 8y agoI have been using PHP for a new job after not using it since PHP 4 too but I was also a very immature dev back then. I quite like it. It's not perfect and it still lacks some things but it's very easy to put something together. I think that my biggest problem is actually that it's too easy, which makes some people write code that it's a bit too sloppy and hard to understand, creating a possibly huge technical dept.
- smhg 8y agoIt was likely PHP 5. The last PHP 4 release is more than 10 years old [1]. Later versions of PHP 5 were worlds apart from version 4. [1] http://php.net/supported-versions.php http://php.net/supported-versions.php
- tombert 8y agoI'm pretty sure it was 4, the company I was working for was...let's just say "slow to update", which is partly why I left.
- settler4 8y agoOne of the best things of PHP today is the ecosystem. The PSR [0] interfaces let you build your own framework using libraries from the major frameworks or independent libraries seamlessly. [0] https://www.php-fig.org/psr/ https://www.php-fig.org/psr/
- aphextron 8y agoPHP 7+ is a totally different world from 4. It’s actually a real programming language now. The massive API redundancy is still there, but you have classes, namespacing, etc.
- glitcher 8y agoAlso adding libsodium directly into PHP core as of 7.2 was a big step in the right direction IMO.
- joeldg 8y agoyou would barely recognize it it's more like Java now that PHP4, just look at what is going on with Laravel ... having moved to a job that uses python and go, I still miss and am in awe that Laravel is the absolute best framework I have encountered in any programming language. There is nothing close to it any of the other languages.
- muglug 8y agoYes, including today's merge of property types: class A { public int $id = 0; public ?Foo $somefoo; } The language has evolved slowly but surely, and it's now much harder to make obvious mistakes thanks to a bunch of good-quality static analysis tools (one of which I authored).
- maxxxxx 8y agoPHP 7 is a very different (better) language compared to 4. You can write very good quality code with it now.