Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

morerock's avatar

Your thought on PHP 7 at the crossroad

Using Laravel for several projects and been giving lot of thought about PHP 7

Laravel like Ruby on Rail isn’t the ideal for performance although Kickstarter has the fund to adopt Ruby on Rails, Laravel is nice for a small scale site, do we really need PHP frameworks when there are functional programming language that doesn’t locked you in and compiled code provide raw performance, >10 times faster than Laravel performance, without compromise in type safe.

PHP7 is 10x slow than Swift 3 and Go. Try benchmarking helloworld.php

PHP Frameworks are 10x complexity than Swift 3 and Go.

Writing some PHP code are not easier to understood. Classes and functional programming are many times slower than most modern languages. Why do we still need to pollute our code?

It spend lot of time reading PHP code and less time to solve simple problem where CURL and static files does really shine and doesn’t make you fight with the language.

If we have a choice, we won’t choose Lumen, Laravel and CI. PHP work well for WordPress and Joomla business case.

PHP 7 has already reached the upper limit that other frameworks could do better in code readability like Swift, Go, Node.js and Ruby on Rails does, it’s time to move on, you won’t feel alien to code in other languages.

0 likes
11 replies
ohffs's avatar

Simply amazing insights there, very persuasive. Well done - especially as you just signed up to share them with us. Now that I've seen the light I'm off to convert all my code to Swift. Maybe one day my projects will be truly web scale.

6 likes
EliasSoares's avatar

Oh god! How did nobody thought this before???

Why do you think that millions of websites, web applications runs over PHP?

Of course that isn't faster than a compiled language! Just an idiot do belive that any parsed language will be so fast as an native language.

PHP is widely used becaus it's a very powerful language, easy to understand, simple to learn and relativelly fast! Yes, fast! Facebook was a big example of this. They used PHP for a lot of time, and I think that they just migrated because they have a BILLION of users.

Do any of your projects have at leas a fraction of this size? No? Okay, bye!

1 like
SaeedPrez's avatar

PHP7 is 10x slow than Swift 3 and Go. Try benchmarking helloworld.php

This is what turned the scale for me in favor of Swift 3 and Go, since most of my clients actually want helloworld.php applications and now I can offer them 10x faster product.. instead of 0.0001 sec it will take 0.00001 sec to execute ☺

2 likes
jimmck's avatar

You see, time and time again. Write it in assembler moron's!!!! Burning my manuals now. I now await the sage words of the Google meister...

davorminchorov's avatar

But I want my applications to be slower than others, what's with all the speed? Everyone is trying to make their application faster but who actually slows down their application? Nobody, so I win at slowing down applications.

SaeedPrez's avatar

Funny thing is, a few projects ago I had to build in a fabricated delay to enhance the user experience. Everything was working so fast the users could not acknowledge it so they would click again and again. So we added a 0.5s delay and an animated loader image ☺

But I think @morerock is focusing on a very small group of developers and their need for optimal speed when 99% (my guesstimate) of us just want it to work, and as long as it doesn't take a long time to load we couldn't care less if it took 0.001 sec or 0.5 sec.

jlrdw's avatar

Wel if something can't happen in .00000000000000000000000000000000001 second, it's no good. Now wake up.

shez1983's avatar

cross posted it on laravel.io ,looks like the OP has an axe to grind with PHP..

No one said to use PHP all the time, use it when it feels right, use something else when that feels right..

comparing SWIFT to PHP when one is for web & another for MOBILE.. lol.. /well done sarcasm..

I doubt we will hear from him/her/it again..

jlrdw's avatar

Or as @jimmck said

You see, time and time again. Write it in assembler

is an interesting idea. Facetiously that is.

gregrobson's avatar

@morerock I urge you to read this article by DHH https://m.signalvnoise.com/ruby-has-been-fast-enough-for-13-years-afff4a54abc7#.erclvzrwx

PHP7 is 10x slow than Swift 3 and Go. Try benchmarking helloworld.php

I've yet to see anyone launch a profitable SaaS product using helloworld.php ;)

All languages have their quirks, but for most of us optimisation isn't an issue - if we have issues with PHP, then we probably have an issue with caching, our database, file storage, front end asset delivery and many other things as well.

PHP 7 has already reached the upper limit that other frameworks could do better in code readability like Swift, Go, Node.js and Ruby on Rails does

Readability is subjective depending on what code is being written. I've seen people write code that is either A) hideous or B) beautiful in many languages over the years. People may hate the $'s everywhere in PHP and the ability to have non-strict types, but it's quite expressive at times - like DHH says about Ruby: they trust the developer. Javascript is great when used well, like any language - on the flip side though they developed ES6 and Coffeescript in order to avoid bracket overload in the editor, it also allows inexperienced developers to engage in "callback hell" because they didn't push to learn more advanced techniques. Each to their own.

PHP isn't great, but It's not bad either (especially since 7). I'll happily continue with it for now :-)

I've spent many years with PHP - I know it's weaknesses well and it has been shown that experienced developers can debug 2-5X faster. Speed of execution is rarely an issue when an extra $20 can double your server speed. The speed of a developer matters a lot more.

lindstrom's avatar

@SaeedPrez I just did the same thing. Had to fake delay on an ajax request that gets queued. The button changed but it didn't feel like anything could have possibly happened except the button change.

As to our trololol OP....

A) WE COULDN'T POSSIBLY CARE LESS C) When you get over being angry because you couldn't get Laravel running so you could try it, come on back and ask a real question here so we can set you straight. However, not before you read the docs: https://laravel.com/docs/5.2

2 likes

Please or to participate in this conversation.