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', 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.0080.00016.85
8.0.100.0000.00716.78
8.0.90.0040.00416.83
8.0.80.0070.00716.85
8.0.70.0050.00216.86
8.0.60.0000.00717.00
8.0.50.0000.00717.00
8.0.30.0060.01416.92
8.0.20.0080.01217.42
8.0.10.0000.00717.09
8.0.00.0080.00916.90
7.4.240.0080.00016.63
7.4.230.0030.00316.48
7.4.220.0210.00916.41
7.4.210.0030.01116.54
7.4.200.0030.00316.25
7.4.160.0100.00616.43
7.4.150.0060.01217.40
7.4.140.0170.00617.86
7.4.130.0110.01016.58
7.4.120.0070.01316.49
7.4.110.0130.00316.35
7.4.100.0070.01116.39
7.4.90.0060.01216.37
7.4.80.0120.00619.39
7.4.70.0070.01016.47
7.4.60.0100.01016.53
7.4.50.0100.00716.20
7.4.40.0040.01216.46
7.4.30.0100.00716.52
7.4.10.0080.01115.15
7.4.00.0120.00714.87
7.3.300.0000.00716.38
7.3.290.0000.00716.42
7.3.280.0130.00616.41
7.3.270.0130.00317.40
7.3.260.0100.00716.44
7.3.250.0050.01316.40
7.3.240.0110.00916.58
7.3.230.0110.00716.65
7.3.210.0130.00316.54
7.3.200.0090.00919.39
7.3.190.0030.01316.62
7.3.180.0160.00616.41
7.3.170.0110.00816.38
7.3.160.0100.00716.55
7.3.130.0090.00615.04
7.3.120.0100.00314.71
7.3.110.0060.01314.79
7.3.100.0100.00314.71
7.3.90.0060.00614.80
7.3.80.0040.00814.79
7.3.70.0070.01015.02
7.3.60.0070.00714.62
7.3.50.0110.00014.79
7.3.40.0070.00714.71
7.3.30.0140.00014.66
7.3.20.0030.01016.67
7.3.10.0100.00616.39
7.3.00.0060.00616.39
7.2.330.0140.00316.54
7.2.320.0070.01016.43
7.2.310.0130.00416.53
7.2.300.0090.00916.76
7.2.290.0060.01016.76
7.2.260.0040.01615.08
7.2.250.0060.00615.16
7.2.240.0090.00614.86
7.2.230.0030.01414.80
7.2.220.0000.01614.79
7.2.210.0030.01114.91
7.2.200.0000.01515.21
7.2.190.0090.00615.19
7.2.180.0110.00014.86
7.2.170.0000.00915.11
7.2.160.0140.00015.09
7.2.150.0050.00516.77
7.2.140.0060.00616.84
7.2.130.0030.01016.89
7.2.120.0030.00616.45
7.2.110.0030.01316.80
7.2.100.0060.00617.04
7.2.90.0090.00916.61
7.2.80.0000.01116.82
7.2.70.0030.01316.86
7.2.60.0020.01217.01
7.2.50.0060.01317.05
7.2.40.0120.00616.94
7.2.30.0040.01117.02
7.2.20.0070.00716.96
7.2.10.0100.00317.04
7.2.00.0070.00718.00
7.1.330.0120.00415.83
7.1.320.0030.00916.02
7.1.310.0000.01015.70
7.1.300.0100.00315.44
7.1.290.0040.01115.79
7.1.280.0050.00315.87
7.1.270.0040.00815.75
7.1.260.0060.00615.97
7.1.250.0060.00315.79
7.1.240.0060.00915.79
7.1.230.0060.00615.78
7.1.220.0090.00615.82
7.1.210.0030.01015.69
7.1.200.0130.00515.70
7.1.190.0040.01115.94
7.1.180.0060.00315.96
7.1.170.0120.00615.71
7.1.160.0030.01015.81
7.1.150.0070.00715.75
7.1.140.0060.00615.75
7.1.130.0080.00015.61
7.1.120.0090.00615.54
7.1.110.0030.00715.91
7.1.100.0070.00816.99
7.1.90.0100.00315.77
7.1.80.0120.00015.81
7.1.70.0020.00816.31
7.1.60.0030.01517.66
7.1.50.0070.01216.23
7.1.40.0070.00715.61
7.1.30.0030.00915.61
7.1.20.0100.00315.86
7.1.10.0070.01015.48
7.1.00.0020.04619.11
7.0.330.0000.01115.45
7.0.320.0070.00715.27
7.0.310.0060.01015.11
7.0.300.0060.00315.07
7.0.290.0070.00715.13
7.0.280.0060.00615.54
7.0.270.0040.00815.11
7.0.260.0100.00315.53
7.0.250.0000.01415.11
7.0.240.0050.00315.35
7.0.230.0060.00915.27
7.0.220.0050.00515.40
7.0.210.0040.00815.30
7.0.200.0080.00515.94
7.0.190.0050.00515.41
7.0.180.0070.00715.32
7.0.170.0030.01015.32
7.0.160.0000.01215.26
7.0.150.0060.00915.18
7.0.140.0040.01115.33
7.0.130.0040.00815.50
7.0.120.0060.00615.36
7.0.110.0130.00315.18
7.0.100.0120.00615.50
7.0.90.0070.01015.39
7.0.80.0000.01415.48
7.0.70.0030.00615.26
7.0.60.0110.04618.56
7.0.50.0080.04216.62
7.0.40.0160.02016.73
7.0.30.0200.04416.85
7.0.20.0210.03516.89
7.0.10.0060.02516.95
7.0.00.0050.03816.87
5.6.400.0060.00314.30
5.6.390.0030.00813.86
5.6.380.0030.00914.22
5.6.370.0030.00614.32
5.6.360.0030.01014.54
5.6.350.0100.01014.08
5.6.340.0070.01014.46
5.6.330.0070.00313.98
5.6.320.0040.01114.12
5.6.310.0030.01414.66
5.6.300.0030.01214.68
5.6.290.0130.00314.54
5.6.280.0040.02217.80
5.6.270.0030.00614.40
5.6.260.0030.01514.21
5.6.250.0100.00714.43
5.6.240.0120.00314.33
5.6.230.0000.01314.54
5.6.220.0060.00614.31
5.6.210.0070.04517.43
5.6.200.0050.04716.21
5.6.190.0090.02517.43
5.6.180.0190.02717.30
5.6.170.0170.02117.33
5.6.160.0000.02617.31
5.6.150.0100.04116.30
5.6.140.0050.02216.34
5.6.130.0030.03116.19
5.6.120.0020.05017.58
5.6.110.0090.04217.75
5.6.100.0050.04817.59
5.6.90.0050.02817.59
5.6.80.0020.04517.25
5.6.70.0070.00713.94
5.6.60.0000.00914.13
5.6.50.0060.00914.23
5.6.40.0100.00014.36
5.6.30.0000.01414.44
5.6.20.0060.00614.34
5.6.10.0070.00714.25
5.6.00.0000.01114.34
5.5.380.0000.01114.19
5.5.370.0090.00614.34
5.5.360.0080.00614.09
5.5.350.0070.02717.10
5.5.340.0150.03715.92
5.5.330.0030.02517.01
5.5.320.0270.04017.11
5.5.310.0180.04117.29
5.5.300.0030.02316.12
5.5.290.0100.04016.10
5.5.280.0070.03817.45
5.5.270.0080.04517.29
5.5.260.0110.04217.50
5.5.250.0050.03717.30
5.5.240.0180.03517.08
5.5.230.0060.00613.95
5.5.220.0040.01214.14
5.5.210.0070.00714.12
5.5.200.0040.00413.71
5.5.190.0040.00713.79
5.5.180.0030.00613.99
5.5.170.0080.00413.74
5.5.160.0100.00313.96
5.5.150.0070.00713.92
5.5.140.0090.00614.10
5.5.130.0030.00613.86
5.5.120.0090.00613.93
5.5.110.0060.00613.84
5.5.100.0080.00614.24
5.5.90.0040.01113.94
5.5.80.0060.00913.80
5.5.70.0040.00414.11
5.5.60.0080.00813.72
5.5.50.0030.01013.84
5.5.40.0040.01114.00
5.5.30.0000.01314.14
5.5.20.0070.00713.73
5.5.10.0120.00413.82
5.5.00.0040.01113.82

preferences:
40.45 ms | 400 KiB | 5 Q