8

Had to create a quick server side script. Created a quick function that returns an array, and tried to access a value from the function call like this:

$val = func()[0]

Apparently php didn’t include that feature until PHP 5.4

Wtf PHP.

Log into my webhost to update the the PHP version; only to discover that the highest PHP is PHP 5.5. PHP 7 is the current revision.

Wtf a2hosting.

Comments
  • 1
    I got fucked over by this last year. Built a system for a client using that functionality then they told me they want to host it them selves on their own server which supported some old ass version (cant remember the exact one) and had to refactor the entire system 😂
  • 7
    @oudalally new features being added in new versions makes it a mess?

    Lol are you even a developer??same can be said for anything, you use older versions than something was built for, it ain't going to work.
  • 0
    @InterferenceObj yep... and my webhost doesn’t even have freaking docker support! I honesty don’t know how they are competitive nowadays...
  • 0
    @oudalally I actually started on PHP lmao. Once I switched, I never looked back... until now. I wouldn’t call it “bad”, but I agree with you, it’s just a messy system overall.
  • 0
    @oudalally Exactly. At the end of the day, it is Turing complete, so everything can be done in PHP... but the amount of man-hours you are going to burn trying to get PHP to work would be much better spent in stricter or more specialized languages.
  • 0
    @oudalally I'd say it's more a case against webhotels
  • 0
    @oudalally a lot of this legacy stuff is starting to get removed as php matures. One of those things recently is that you can longer provide a salt for the password hashing function, it is now 100% done by the language to make sure that the salt is actually changing. PHP 7 really put a new light on PHP and I'm really hoping it continues this way.
  • 0
    I like a2 but I only put static and WordPress sites on there.

    For more advanced projects, digital ocean and serverpilot.

    // Well I would do the same on any web hosting providers not necessarily a2.
Add Comment