

The PHP Benchmark - cruise02
http://www.phpbench.com/

======
RossM
Interesting that the old using-double-quotes-is-slower thing is actually
disproven. Actually it's slightly confusing as it _should_ be slower - double-
quoted strings are parsed to find inline variables - yet single-quoted strings
are a tiny bit slower.

Any reasoning on this?

------
Zarathu
I'm a little disappointed by the creator of this site. While the idea
certainly seems to be beneficial, I don't think it approaches the full
potential by neglecting other languages.

While PHP is, effectively, an awful language whose audience rather needs this
tool, this should have been made available on a more global scale.

~~~
RossM
I think the intention is to compare methods within the language itself, rather
than to other languages.

~~~
Zarathu
Right. I think this should be made available for other languages as well.

------
Nycto
I couldn't find what version of PHP he was testing anywhere on the page.
However, the second test ("Using the =&-ref-operator") makes me think he isn't
testing PHP 5. This functionality was deprecated and, if error reporting is
turned up, will cause an E_STRICT error to be thrown.

------
scribu
In the case of "Counting Loops", PHP is slower because it actually calls the
count() function for each iteration.

Conclusion? Use foreach loops instead, which are the fastes. :)

