3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace T ; define('ARGUMENT', uniqid()); function callWithArgs(callable $callback, array $args = []) { return function($param) use($callback, $args) { array_walk($args, function(&$arg) use($param) { $arg === \T\ARGUMENT and $arg = $param; }); return $callback(...$args); } } $t = T\callWithArgs('str_replace', ['dolor', 'DOLOR', T\ARGUMENT]); $string = 'Lorem ipsum dolor simet'; var_dump( $t($string) );

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.0.20.0270.07720.05
7.0.10.0070.05720.07
7.0.00.0030.06020.25
5.6.170.0130.04320.40
5.6.160.0030.06020.52
5.6.150.0130.07318.15
5.6.140.0070.03718.19
5.6.130.0030.04018.19
5.6.120.0070.04020.91
5.6.110.0200.07021.00
5.6.100.0000.04721.02
5.6.90.0030.06321.03
5.6.80.0070.05020.42
5.5.310.0370.06320.28
5.5.300.0000.04317.98
5.5.290.0130.06718.07
5.5.280.0100.08020.95
5.5.270.0070.07720.88
5.5.260.0100.08320.77
5.5.250.0030.04020.71
5.5.240.0300.07020.20

preferences:
144.56 ms | 1394 KiB | 7 Q