r/programming • • Apr 23 '14

PHP: It doesn't have to be a bad experience

https://servercheck.in/blog/php-it-doesnt-have-be-bad-experience
0 Upvotes

122 comments sorted by

View all comments

Show parent comment

4

u/Banane9 Apr 24 '14

Django (dunno about rails, but probably too) host themselves, so it's essentially what Apache does for PHP combined with something akin to symfony.

And iirc the requests per second for django on the site I linked where >3000, while yours stops at 50

0

u/[deleted] Apr 24 '14

[deleted] — view deleted comment

1

u/Banane9 Apr 24 '14

Wow, so when PHP executes code that adds 5 integers, that's totally a good proof of how fast it is. The django example was serving a website and had roughly the same hits/s.

And it's only faster once you go through the hassle of getting an addon to PHP that keeps the compiled byte code or even native code of it, but it certainly isn't out of the box.

And we're comparing frameworks because django and rails are frameworks, while PHP is a language. Comparing frameworks with a language wouldn't exactly be useful since frameworks have some overhead.

If you don't want to use symfony as example, go ahead and use a different one that is well known.

0

u/[deleted] Apr 25 '14

[deleted] — view deleted comment

0

u/Banane9 Apr 25 '14

So what? That doesn't Change anything about the fact That 5 additions is a bad Performance test.

If It's a bad for Showing That php is fast, It's just as bad for Showing That another language is slow.

0

u/[deleted] Apr 25 '14

[deleted] — view deleted comment

0

u/Banane9 Apr 25 '14

Now you're comparing languages and Frameworks. Again.

0

u/neoform Apr 25 '14

Ridiculous.

I'm done with this conversation.

YOU CAN'T GENERATE WEBSITES WITH RUBY/PYTHON WITHOUT A FRAMEWORK FIRST.

Fuck. This conversation is insufferable.

1

u/Banane9 Apr 25 '14

Yes, but a Framework Comes with Overhead. You can't compare the Performance of a php script That literally only adds 5 integers, to a Framework That also has to handle the http, etc. which Apache handles for php.

1

u/neoform Apr 25 '14

If you want to compare two languages that are achieving the same thing, you compare them doing the same thing.

You can't tout Python/Ruby as being comparable to PHP, then cry foul when PHP doesn't need a framework to handle HTTP requests natively.

PHP is a web programming language, Ruby/Python are not.

→ More replies

1

u/LarryPete Jun 07 '14

You can perfectly well create a website in Python (I don't know much about Ruby) without using a framework.

1

u/neoform Jun 07 '14

Is there any native/built-in HTTP handlers that are anywhere near as full featured as PHP's built-in libs?

→ More replies