3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TextTest { public function entities($str) { return substr($str,0); } $answerset = array('answers'=>array(50=>array('answerlong'=>'somestring'))); $text = new TextTest(); ob_start(); $time = microtime(1); $i = 0; while($i++ < 10000) echo'<td>',$text->entities($answerSet['answers'][$questionId]['answerLong']),'</td>'; ob_end_clean(); echo (microtime(1)-$time)." seconds for commas"; echo "\n"; ob_start(); $time = microtime(1); $i = 0; while($i++ < 10000) echo'<td>'.$text->entities($answerSet['answers'][$questionId]['answerLong']).'</td>'; ob_end_clean(); echo (microtime(1)-$time)." seconds for dot";
Output for 5.4.0 - 5.4.8
Parse error: syntax error, unexpected '$answerset' (T_VARIABLE), expecting function (T_FUNCTION) in XZHCV on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.18
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in XZHCV on line 5
Process exited with code 255.

preferences:
175.48 ms | 1395 KiB | 35 Q