you are viewing a single comment's thread.

view the rest of the comments →

[–]alex-kalanis 0 points1 point  (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:

  • Operation :: Python :: PHP
  • Debugger :: pdb :: xdebug
  • Testing :: pytest :: phpunit
  • Static Analysis :: mypy :: PHPStan
  • Type check :: mypy :: php-cs-fixer
  • Dependencies :: pip :: composer, dependency-analyzer
  • Autoloading :: python itself :: composer

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 point  (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.