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 = 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)
8.0.110.0060.00316.93
8.0.100.0050.00216.72
8.0.90.0030.00516.78
8.0.80.0140.00016.98
8.0.70.0030.00517.05
8.0.60.0000.00817.01
8.0.50.0040.00417.03
8.0.30.0100.00817.02
8.0.20.0140.00617.40
8.0.10.0040.00417.07
8.0.00.0100.01016.70
7.4.240.0030.00316.54
7.4.230.0070.00016.46
7.4.220.0090.00916.45
7.4.210.0090.00916.60
7.4.200.0070.00016.63
7.4.160.0080.00816.44
7.4.150.0090.00917.40
7.4.140.0140.00817.86
7.4.130.0120.00816.53
7.4.120.0080.01016.46
7.4.110.0100.00716.38
7.4.100.0090.00916.43
7.4.90.0120.01216.48
7.4.80.0110.00619.39
7.4.70.0110.00616.28
7.4.60.0100.00616.54
7.4.50.0090.00616.14
7.4.40.0100.00716.48
7.4.30.0100.01016.32
7.4.00.0060.00915.08
7.3.300.0000.00716.18
7.3.290.0100.00716.29
7.3.280.0090.01016.37
7.3.270.0110.03517.40
7.3.260.0130.00316.41
7.3.250.0090.00916.39
7.3.240.0120.00516.47
7.3.230.0200.00316.39
7.3.210.0040.01216.62
7.3.200.0070.01319.39
7.3.190.0080.00816.23
7.3.180.0030.01316.25
7.3.170.0090.00916.46
7.3.160.0120.00916.45
7.2.330.0070.01016.82
7.2.320.0070.01016.85
7.2.310.0040.01116.74
7.2.300.0100.01016.75
7.2.290.0030.01316.54
7.2.60.0060.00916.89
7.2.00.0040.01119.14
7.1.200.0040.00415.63
7.1.100.0030.00917.96
7.1.70.0000.00817.25
7.1.60.0030.02319.40
7.1.50.0060.00616.93
7.1.00.0000.07322.30
7.0.200.0000.00816.37
7.0.60.0170.05321.78
7.0.50.0030.04017.91
7.0.40.0100.08320.20
7.0.30.0200.04320.26
7.0.20.0270.05720.23
7.0.10.0030.09020.06
7.0.00.0100.08320.05
5.6.280.0000.06020.94
5.6.210.0070.07320.71
5.6.200.0070.07718.18
5.6.190.0100.08320.46
5.6.180.0230.04320.46
5.6.170.0170.04020.48
5.6.160.0130.06020.57
5.6.150.0130.05018.13
5.6.140.0070.08018.25
5.6.130.0000.04718.22
5.6.120.0100.06721.13
5.6.110.0070.08320.98
5.6.100.0100.04021.07
5.6.90.0100.04021.00
5.6.80.0070.07720.45
5.5.350.0100.03020.46
5.5.340.0100.04018.04
5.5.330.0030.04320.30
5.5.320.0430.04020.24
5.5.310.0270.06020.30
5.5.300.0130.05318.04
5.5.290.0100.03718.02
5.5.280.0130.06720.88
5.5.270.0100.06320.85
5.5.260.0170.07320.89
5.5.250.0000.04720.60
5.5.240.0200.06020.13

preferences:
31.56 ms | 400 KiB | 5 Q