3v4l.org

run code in 300+ PHP versions simultaneously
<?php function conf_path() { static $path; if($path != null) { return $path; } $path = '../sites/swissquote.eu.fx'; return $path; } $time = microtime(true); $i=0; while($i < 60000) { $i++; str_replace(dirname(conf_path()).'/', '', conf_path()); } $time = microtime(true) - $time; echo 'str_replace() took ' . number_format($time, 3) . ' seconds';

preferences:
44.03 ms | 402 KiB | 5 Q