10

Why is there so muche hate on PHP, and what should one use instead? 🤔

Comments
  • 2
    I love php and i use laravel to dev for a couple projects
  • 2
    I personally use it at work (with Drupal 8 (I hate this shit)), and use Laravel for one big side project. I also liked how Symfony's logic works, but I think Laravel is more fun and a lot closer from how Rails works
  • 0
    @Alt-Grrr man you suck at convincing 😄
  • 12
    PHP is a fundamentally flawed language.

    The execution model doesn't make sense for the modern web (it was an ok idea when shared hosting was the norm but with virtualization and containers it is idiotic).

    The standard library is a mess.

    The Java style OO functionality is not a good fit for a weakly typed dynamic language and without generics it doesn't work well with strict types (if they add generics, scalar objects and make strict types the default this would be less of an issue).

    Unicode support is horrible(which is unacceptable for the web) and dependant on a crappy extension (mb_)

    As for what you should use instead, it depends, PHP may be a piece of shit language that is a royal pain in the arse to work with but it is still very powerful, commonly used and reasonably fast as long as you respect the execution model (don't use laravel).

    All languages suck, you just have to decide which one sucks the least for what you are doing and live with the pain.
  • 3
    C, obviously! That's what CGI is for!
  • 0
    As always, you should roll your own!
  • 0
    @Drillan767 is laravel really close with rails? I wanna know about rails 😄
  • 1
    @kmdrn7 There a lot of stuff in common: how you manage your migrations, the seeds, the way you display the datas in the view (if you use twig / erb), how Eloquant / ActiveRecord works to find your datas ( $record = Entity::find(1) / @record = Entity.find(1))...

    Obviously, Rails has its syntax and its language, but going from a techno to another has never been this easy for me :D
Add Comment