3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$host = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; $host = 'unix://unixhost'; $start = microtime(true); for ($i=0; $i<=1000; $i++) { substr($host, 0, strlen('unix://')) !== 'unix://'; } echo (microtime(true) - $start) . PHP_EOL; $start = microtime(true); for ($i=0; $i<=1000; $i++) { strpos($host, 'unix://') !== 0; } echo (microtime(true) - $start) . PHP_EOL; $start = microtime(true); for ($i=0; $i<=1000; $i++) { preg_match('~^unix://~', $host); } echo (microtime(true) - $start) . PHP_EOL;

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.4.330.0070.00816.71

preferences:
51.83 ms | 403 KiB | 5 Q