3v4l.org

run code in 300+ PHP versions simultaneously
<?php function grep($pattern) { echo "Looking for $pattern\n"; while (true) { $line = (yield); if (false !== strpos($line, $pattern) { echo "$line\n"; } } } // Imagine we parsed a file which returned the following lines. $lines = array( "<?php\n", "echo 'toto';", ); $g = grep('php'); foreach ($lines as $line) { $g->send($line); }

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)
5.4.260.0100.05018.87
5.4.250.0100.05018.75
5.4.240.0030.06019.09
5.4.230.0230.04318.74
5.4.220.0100.05718.77
5.4.210.0100.06018.91
5.4.200.0100.05318.79
5.4.190.0230.04718.83
5.4.180.0130.05018.74
5.4.170.0100.05318.96
5.4.160.0100.05718.91
5.4.150.0070.08018.73
5.4.140.0130.06316.34
5.4.130.0070.05316.43
5.4.120.0070.05016.54
5.4.110.0070.07716.39
5.4.100.0130.06016.38
5.4.90.0030.05316.40
5.4.80.0070.05016.28
5.4.70.0130.05016.47
5.4.60.0170.04316.38
5.4.50.0130.04316.46
5.4.40.0030.07016.65
5.4.30.0070.07316.52
5.4.20.0130.04716.41
5.4.10.0100.05016.60
5.4.00.0130.04715.79
5.3.280.0030.05714.68
5.3.270.0130.06014.59
5.3.260.0130.05714.69
5.3.250.0070.06314.67
5.3.240.0200.06714.69
5.3.230.0030.06014.59
5.3.220.0130.04714.70
5.3.210.0130.04714.55
5.3.200.0070.05714.55
5.3.190.0130.04714.63
5.3.180.0130.05014.65
5.3.170.0100.04714.61
5.3.160.0100.05314.40
5.3.150.0000.05714.74
5.3.140.0070.05714.63
5.3.130.0070.08314.73
5.3.120.0270.03314.63
5.3.110.0270.05714.73
5.3.100.0000.06314.21
5.3.90.0100.05314.11
5.3.80.0070.05714.00
5.3.70.0130.06714.11
5.3.60.0030.05314.18
5.3.50.0100.04313.85
5.3.40.0000.07313.96
5.3.30.0100.07013.89
5.3.20.0100.04713.66
5.3.10.0030.05313.66
5.3.00.0000.05713.73

preferences:
142.12 ms | 1394 KiB | 7 Q