PHP 5.4.12 (cli) (built: Mar 8 2013 11:16:05)
Method heredoc 1000000 iterations in 1.970294 secs
$var = <<<EOT
<html><head><title>Benchmark Test Page</title></head><body bgcolor=
"$bgcolor" text="$textcolor" {$foo->bar()} link="$link"><p><font face="$fontface"
size="$fontsize"> Here is some test text for the web page.</font>
</p></body></html>
EOT;
Method double-quoted 1000000 in 1.908962 secs
$var = "<html><head><title>Benchmark Test Page</title></head><body bgcolor=
\"$bgcolor\" text=\"$textcolor\" {$foo->bar()} link=\"$link\"><p><font face=\"$fontface\"
size=\"$fontsize\"> Here is some test text for the web page.</font>
</p></body></html>";
Method single-quoted 1000000 in 2.230555 secs
$var = '<html><head><title>Benchmark Test Page</title></head><body bgcolor=
"'. $bgcolor. '" text="'. $textcolor . '" ' . $foo->bar() . ' link="' . $link . '"><p><font face="' . $fontface . '"
size="' . $fontsize .'"> Here is some test text for the web page.</font>
</p></body></html>';