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 === 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.0030.00516.92
8.0.100.0040.00417.00
8.0.90.0000.00716.81
8.0.80.0140.00716.96
8.0.70.0070.00016.77
8.0.60.0040.00416.84
8.0.50.0040.00416.93
8.0.30.0120.00716.97
8.0.20.0110.00717.40
8.0.10.0040.00417.04
8.0.00.0080.01116.81
7.4.240.0030.00616.30
7.4.230.0000.00716.33
7.4.220.0070.01716.42
7.4.210.0090.00716.55
7.4.200.0030.00316.47
7.4.160.0060.01016.40
7.4.150.0070.01117.40
7.4.140.0150.00717.86
7.4.130.0090.00816.45
7.4.120.0050.01216.37
7.4.110.0070.01016.36
7.4.100.0030.01416.42
7.4.90.0120.00616.40
7.4.80.0070.01019.39
7.4.70.0030.01216.38
7.4.60.0070.01016.52
7.4.50.0060.01316.58
7.4.40.0130.00316.42
7.4.30.0140.00316.41
7.4.00.0080.00714.98
7.3.300.0040.00416.16
7.3.290.0030.00316.18
7.3.280.0110.00816.32
7.3.270.0090.01017.40
7.3.260.0100.00616.28
7.3.250.0120.00616.32
7.3.240.0060.01416.38
7.3.230.0060.01216.55
7.3.210.0080.00816.46
7.3.200.0060.01219.39
7.3.190.0130.00316.39
7.3.180.0080.00816.39
7.3.170.0070.01016.36
7.3.160.0070.00916.26
7.3.120.0100.01014.88
7.3.110.0110.00714.69
7.3.100.0090.00614.64
7.3.90.0090.00614.82
7.3.80.0040.01114.77
7.3.70.0030.01014.82
7.3.60.0070.01014.71
7.3.50.0100.01014.65
7.3.40.0030.00614.59
7.3.30.0100.00714.89
7.3.20.0120.00616.70
7.3.10.0070.01316.63
7.3.00.0070.01316.74
7.2.330.0100.00716.63
7.2.320.0170.00016.77
7.2.310.0130.00316.68
7.2.300.0120.01216.75
7.2.290.0100.00616.71
7.2.250.0110.00715.02
7.2.240.0030.01615.23
7.2.230.0030.01015.32
7.2.220.0060.00915.03
7.2.210.0080.00815.40
7.2.200.0000.01314.86
7.2.190.0110.00414.98
7.2.180.0100.00715.06
7.2.170.0040.00815.12
7.2.60.0060.01016.77
7.2.00.0060.00619.25
7.1.330.0040.01115.82
7.1.320.0030.01015.59
7.1.310.0070.00715.52
7.1.300.0060.01215.64
7.1.290.0040.00715.76
7.1.280.0080.01115.72
7.1.270.0100.00715.61
7.1.260.0100.00715.69
7.1.200.0060.00615.71
7.1.100.0030.01317.71
7.1.70.0040.00417.16
7.1.60.0100.01419.40
7.1.50.0040.01116.70
7.1.00.0070.07322.32
7.0.200.0030.00616.71
7.0.60.0100.07321.70
7.0.50.0030.04017.90
7.0.40.0070.08720.16
7.0.30.0270.06020.09
7.0.20.0200.06720.15
7.0.10.0100.07720.26
7.0.00.0170.06320.06
5.6.280.0070.06320.88
5.6.210.0170.07020.52
5.6.200.0070.08018.14
5.6.190.0070.08320.55
5.6.180.0270.06020.49
5.6.170.0130.04320.50
5.6.160.0130.08020.50
5.6.150.0030.05318.24
5.6.140.0070.03718.21
5.6.130.0030.04018.17
5.6.120.0130.07721.03
5.6.110.0070.08320.98
5.6.100.0030.04021.14
5.6.90.0130.07021.00
5.6.80.0100.08020.52
5.5.350.0030.04320.46
5.5.340.0000.06317.94
5.5.330.0070.03720.30
5.5.320.0570.07020.25
5.5.310.0270.08320.30
5.5.300.0070.04318.01
5.5.290.0070.08018.01
5.5.280.0130.08020.85
5.5.270.0030.07020.80
5.5.260.0100.07720.67
5.5.250.0000.04320.71
5.5.240.0300.06720.38

preferences:
32.71 ms | 401 KiB | 5 Q