[TYPO3-core] RFC #12066: Code cleanup: Add some constants

Sigfried Arnold s.arnold at rebell.at
Wed Mar 3 18:50:05 CET 2010


Am 03.03.2010 18:33, schrieb Steffen Kamper:
> seems you didn't read it carefully, you're wrong. Double quotes enable
> parsing, which obviously is slower than single quotes without parsing.

sorry, but i guess you did not read it carefully enough :)

double quotes are (insignificantly) faster than single quotes (as you 
can see, i delivered benchmarks for that). double quotes only slow down, 
if there are variables to be parsed in the string - but that is not 
possible in single quoted strings. so it's impossible to compare those.

again
echo "foo"; is definitly faster than echo 'foo';

but echo "foo $bar"; is slower than echo "foo" . $bar; or echo 'foo' . 
$bar; since concatenation is faster than evaluation the string.

Older versions of the PHP documentation stated that fact but it seems to 
be removed now.

And as i said before: these performance differences are so insignificant 
in practical use, you won't even notice if something takes 2100 µs or 
2150 µs.


More information about the TYPO3-team-core mailing list