DEV Community


Discussion on: Imposter Syndrome: PHP Edition

aleksikauppila profile image
Aleksi Kauppila

I've been doing PHP full time for about a year and i think it's a very useful language to do web apps.

The language itself has a clear syntax with both argument type hints and return type hints which allows devs to be a lot more strict about method inputs and outputs without stupid type checking inside the method block. I also like the dollar sign because it distinctively indicates that you're dealing with a variable. You have constructs to build interfaces and abstract classes as well as anonymous functions and classes.

Standard library offers quite a a few interfaces to work with too. However many of the SPL's functions act pretty inconsistently (differing parameter order, some take parameters as values, some as references). It's a bit annoying but doesn't really get too much on my way.

I like how you can create a blank project template with Composer, PHPUnit and PHPStan literally in under a minute and start creating unit tests.

thinsoldier profile image
thinsoldier • Edited

Back in the day I would frequently come across people writing php in notepad.exe with no syntax coloring. The key reason they chose php was because $ made it easy to see which words were variables, lol.

Forem Open with the Forem app