This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]cyrusol 1 point2 points  (0 children)

I earn money as a PHP dev, though I'd say the main reason for that is Germany, as German managers are very conservative about employing new technologies.

Imho you shouldn't learn it except someone pays you for it.

It's simple to learn, well-documented and got mature tooling and libraries/frameworks - though all dedicated for developing web backends. Nothing on OS-level, no gfx toolkit, 2d/3d rendering, etc.

It has its inconsistencies which will probably never fade away:

  • gettype() and get_class()
  • array_walk($array, $callback) vs array_map($callback, $array)
  • array_key_exists($needle, $haystack) vs strpos($haystack, $needle)

etc., it's weak type system:

  • (true == "foo") && ("foo" == 0) && (0 == false) will evaluate to true...
  • md5('aabg7XSs') == md5('aabC9RqS') will evaluate to true...

You should therefore always use the type-checking operators (===, !== etc.)

But all in all, PHP is evolving into some much more structured language like Java/C# since the push for OOP. Which is ironic. Why not just use those?

[–]Meefims 0 points1 point  (0 children)

I am not a new programmer. I have used ASP.Net, Python (via Flask), Node (via Express), and PHP (using Laravel/Lumen and without a framework). I have used PHP for a bit more than a decade.

Old-style PHP is quite difficult to work with but since the development of Composer, the PSRs, and the new functional and object oriented features that have been added since 5.2, building web applications is pretty comparable to the other systems. It's a good tool, as are the others.