4 ms·
I can't help but get the impression that the author has not kept up with recent developments in the PHP world. Python has PEP-8. PHP has FIG. Not as ubiquitous
by JonoBB 13y ago
I can't help but get the impression that the author has not kept up with recent developments in the PHP world.
Python has PEP-8. PHP has FIG. Not as ubiquitous, but its getting there.
"There is package management in PHP but I never found any code bases in the wild using it to the same extent as PIP". Wait, what? Just about everyone uses Packagist and Composer these days.
Also, isn't is pythonista, not pythonist?
By the way, no disrespect to Python, which I use as well. There are arguments for preferring python over php in some circumstances, but most of the reasons given in this article lack validity.
- yareally 13y agoI never actually heard of FIG and have been using PHP for quite a few years. Are they new? I don't follow PHP news as close as I used to with having to use other languages more often so perhaps that is why. Only standards I was aware of for PHP are those that Zend[1] gives. edit: Looking at the guidelines on FIG, they really should take some cues from PEP 8 and make the writing style look less hostile and less RFCish², if they want a majority of the community to willingly read it. Discussing it with a fellow PHP developer looking over the FIG guides, he said it best (by quoting PEP 8): "A Foolish Consistency is the Hobgoblin of Little Minds" [1] http://framework.zend.com/manual/1.12/en/coding-standard.html http://framework.zend.com/manual/1.12/en/coding-standard.htm... ²Nothing against RFC and the format works for what they are trying to accomplish. It doesn't work so well for coding guidelines though.
- JonoBB 13y agoFIG (http://www.php-fig.org/ http://www.php-fig.org/), of which Zend is a member, has been around for 2-3 years, but only really gained traction in the last 18 months or so. No one cares about Zend coding standards anymore.
- ihsw 13y agoPHP-FIG is a committee of members hailing from a broad splash of frameworks. There has been very little leadership in the PHP community regarding coding standards (all frameworks have their own "coding guidelines" for contributing to core/building packages) so this group establishes standards for that. They have branched out and there are efforts towards establishing common interfaces too (logger, http client, and so forth). PSR-1 and PSR-2 are generally accepted as being authoritative on how to write "Good PHP".
- jtreminio 13y agoThe majority of the community[0] are following the FIG standards. 3rd party PHP libraries have become so much easier to read in recent years thanks in large part to the work of the FIG. [0] - Majority of community being major players like most frameworks and almost all of the most popular libraries.
- deleted 13y ago[deleted]
- yareally 13y agoGood to know they're finally going for uniformity. I was mostly referring to the average developer whose code you might read at work or from some code one might find on Github. Major frameworks and libraries going in that directly though is still a very good thing.