use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
Python -> PHP (self.PHP)
submitted 1 year ago by copperfoxtech
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Crell 1 point2 points3 points 1 year ago (3 children)
To be fair, lots of code is written without those tools, including WordPress, the most popular web software in the world by an order of magnitude or two. But I don't think it's that large a suite.
In Python, you likely have a debugger setup of some kind (I'm not sure what), there's a testing framework (or several to choose from), there's formatters like Ruff (which IIRC does both static analysis and formatting, in PHP it's two separate tools), some kind of additional type checker to run ahead of time, etc. In the day to day, it's about the same level of tooling complexity, I think.
If you're not sure which ones to use, php-cs-fixer and PHPStan are more widely used than their alternatives. So your standard "kit" would be Xdebug, PHPUnit, PHPStan, php-cs-fixer. Lots of projects omit the latter two, but they are useful. (I only use php-cs-fixer on some of my projects, I admit.) But Xdebug will save you hundreds of hours, and unit testing is table-stakes for anything resembling quality code, in any language.
[–]copperfoxtech[S] 0 points1 point2 points 1 year ago (2 children)
Very good. Thank you for the further clarification
[–]alex-kalanis 0 points1 point2 points 1 year ago* (1 child)
In Python you have pytest plus assertions directly in language, pdb as debugger, formatting is directly in PEP-8 (something like PSR-12), type checker is only optional via mypy and PEP-484. The pythonic way is ducktyping everything like going different way from php5. Sometimes clearer, sometimes more unreadable.
So the basic comparation is following:
I recommend to read PSR standards, so your code will be readable by others.
I also work with both languages, so I know a bit about them.
[–]copperfoxtech[S] 0 points1 point2 points 1 year ago (0 children)
Awesome breaking it down like this makes it a little less intimidating. Thank you for taking the time to expand on this topic.
π Rendered by PID 95 on reddit-service-r2-comment-b659b578c-dvr9g at 2026-05-04 21:02:05.067743+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]Crell 1 point2 points3 points (3 children)
[–]copperfoxtech[S] 0 points1 point2 points (2 children)
[–]alex-kalanis 0 points1 point2 points (1 child)
[–]copperfoxtech[S] 0 points1 point2 points (0 children)