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.0200.08320.12
7.0.10.0130.08020.12
7.0.00.0170.07720.24
5.6.170.0170.04320.62
5.6.160.0000.04720.44
5.6.150.0070.05018.18
5.6.140.0000.04018.28
5.6.130.0100.07718.12
5.6.120.0100.05720.98
5.6.110.0130.06321.10
5.6.100.0000.05020.97
5.6.90.0100.08021.02
5.6.80.0130.07720.39
5.5.310.0230.04320.42
5.5.300.0030.04018.04
5.5.290.0100.07318.08
5.5.280.0070.08320.90
5.5.270.0100.06320.78
5.5.260.0130.07720.97
5.5.250.0070.04020.48
5.5.240.0330.06720.27

preferences:
139.53 ms | 1394 KiB | 7 Q