3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = microtime(true); for ($i = 0; $i < 1000; $i++) echo strtr('React/Controller/Website/User', '/', '_') . "\n"; printf('%.09f', microtime(true) - $s); echo "\n"; $s = microtime(true); for ($i = 0; $i < 1000; $i++) echo str_replace('/', '_', 'React/Controller/Website/User') . "\n"; printf('%.09f', microtime(true) - $s);

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.2.00.0030.01019.49
7.1.70.0080.00017.16
7.1.60.0040.02119.33
7.1.50.0140.00734.69
7.0.200.0000.00916.91

preferences:
30.42 ms | 401 KiB | 5 Q