3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CallableStringifier { private static $callables = array(); public static function stringify($callable) { $id = count(self::$callables); self::$callables[$id] = $callable; if (is_array($callable)) { $func = new ReflectionMethod($callable[0], $callable[1]); } else if (is_string($callable) && false !== strpos($callable, '::')) { $func = new ReflectionMethod($callable); } else { $func = new ReflectionFunction($callable); } $params = array(); foreach ($func->getParameters() as $param) { $params[$param->getPosition()] = '$' . $param->getName(); } return __CLASS__ . '::call(' . $id . ', ' . implode(', ', $params) . ');'; } public static function call($id, $args) { return call_user_func_array(self::$callables[$id], $args); } } var_dump(CallableStringifier::stringify(function($arg1) { return $arg1; })); $func = create_function('$arg1', CallableStringifier::stringify(function($arg1) { return $arg1; })); echo $func(1);

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.3.60.0120.00318.55
8.3.50.0120.00921.93
8.3.40.0120.00318.96
8.3.30.0000.01520.35
8.3.20.0100.00718.91
8.3.10.0120.00620.97
8.3.00.0080.00019.79
8.2.180.0150.00616.50
8.2.170.0040.01122.96
8.2.160.0100.01020.57
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0140.00326.16
8.2.120.0000.00719.95
8.2.110.0040.00719.39
8.2.100.0110.00017.91
8.2.90.0030.00519.86
8.2.80.0060.00318.22
8.2.70.0040.00417.63
8.2.60.0060.00317.75
8.2.50.0030.00517.75
8.2.40.0000.00718.22
8.2.30.0030.00319.52
8.2.20.0060.00317.87
8.2.10.0000.00817.74
8.2.00.0040.00417.83
8.1.280.0060.00925.92
8.1.270.0040.00423.99
8.1.260.0090.00926.35
8.1.250.0140.00028.09
8.1.240.0100.00022.47
8.1.230.0090.00322.80
8.1.220.0030.00517.79
8.1.210.0030.00618.77
8.1.200.0040.00417.35
8.1.190.0090.00017.25
8.1.180.0000.00818.10
8.1.170.0000.00818.55
8.1.160.0030.00618.86
8.1.150.0060.00318.70
8.1.140.0070.00017.36
8.1.130.0000.00717.80
8.1.120.0000.00717.47
8.1.110.0020.00517.32
8.1.100.0040.00417.38
8.1.90.0040.00417.45
8.1.80.0080.00017.37
8.1.70.0030.00317.43
8.1.60.0030.00617.66
8.1.50.0040.00417.39
8.1.40.0050.00517.57
8.1.30.0050.00317.66
8.1.20.0030.00517.69
8.1.10.0000.00717.46
8.1.00.0040.00417.41
8.0.300.0020.00519.89
8.0.290.0000.00916.88
8.0.280.0040.00418.33
8.0.270.0050.00317.31
8.0.260.0000.00716.95
8.0.250.0080.00017.08
8.0.240.0000.00817.00
8.0.230.0030.00517.11
8.0.220.0040.00417.00
8.0.210.0000.00716.85
8.0.200.0030.00317.04
8.0.190.0030.00617.02
8.0.180.0000.00717.06
8.0.170.0000.00717.00
8.0.160.0030.00516.99
8.0.150.0030.00616.95
8.0.140.0000.00716.91
8.0.130.0050.00013.41
8.0.120.0030.00616.84
8.0.110.0020.00516.80
8.0.100.0040.00416.96
8.0.90.0040.00417.04
8.0.80.0080.00816.89
8.0.70.0000.00916.91
8.0.60.0040.00417.04
8.0.50.0050.00316.84
8.0.30.0120.00817.13
8.0.20.0080.01117.40
8.0.10.0070.00016.98
8.0.00.0180.00516.95
7.4.330.0000.00516.90
7.4.320.0070.00016.45
7.4.300.0000.00616.68
7.4.290.0030.00316.53
7.4.280.0030.00316.51
7.4.270.0030.00516.65
7.4.260.0000.00513.39
7.4.250.0040.00416.50
7.4.240.0000.00816.52
7.4.230.0000.00716.78
7.4.220.0090.00916.73
7.4.210.0050.01116.65
7.4.200.0040.00416.60
7.4.190.0070.00016.75
7.4.160.0100.00716.45
7.4.150.0060.01217.40
7.4.140.0100.00817.86
7.4.130.0060.01416.60
7.4.120.0150.00516.60
7.4.110.0080.00816.71
7.4.100.0060.01216.65
7.4.90.0090.01516.59
7.4.80.0090.00819.39
7.4.70.0090.01016.39
7.4.60.0170.00616.50
7.4.50.0030.00516.61
7.4.40.0080.00322.77
7.4.30.0080.00916.38
7.4.00.0080.00614.95
7.3.330.0030.00313.43
7.3.320.0030.00313.43
7.3.310.0070.00016.32
7.3.300.0030.00316.43
7.3.290.0080.00616.45
7.3.280.0090.00916.44
7.3.270.0110.00717.40
7.3.260.0070.01118.24
7.3.250.0090.01116.62
7.3.240.0090.00916.55
7.3.230.0090.00916.72
7.3.210.0030.01416.58
7.3.200.0150.00319.39
7.3.190.0150.00616.52
7.3.180.0070.01016.61
7.3.170.0060.00916.57
7.3.160.0030.01316.55
7.3.120.0000.01714.98
7.2.330.0120.00616.79
7.2.320.0160.00016.43
7.2.310.0030.01916.77
7.2.300.0100.00716.83
7.2.290.0080.00816.79
7.2.60.0040.01116.90
7.2.00.0000.01519.28
7.1.200.0090.00315.60
7.1.70.0000.00917.11
7.1.60.0100.00617.25
7.1.50.0130.00916.90
7.1.00.0030.05022.44
7.0.200.0000.01316.52
7.0.140.0070.07022.02
7.0.100.0130.05019.93
7.0.90.0370.07720.05
7.0.80.0070.08019.87
7.0.70.0030.04319.98
7.0.60.0130.06319.91
7.0.50.0400.07720.35
7.0.40.0100.07720.11
7.0.30.0000.09020.17
7.0.20.0070.04320.13
7.0.10.0100.08020.12
7.0.00.0030.08020.04
5.6.280.0100.06721.05
5.6.250.0100.06020.64
5.6.240.0070.08720.66
5.6.230.0030.08020.52
5.6.220.0100.07720.63
5.6.210.0100.07320.66
5.6.200.0100.04021.08
5.6.190.0130.07721.15
5.6.180.0100.04721.05
5.6.170.0030.06321.19
5.6.160.0070.08021.09
5.6.150.0100.04721.05
5.6.140.0100.04320.95
5.6.130.0070.05021.09
5.6.120.0030.08721.01
5.6.110.0070.08021.01
5.6.100.0100.07320.93
5.6.90.0070.07721.11
5.6.80.0030.06020.45
5.6.70.0070.08320.57
5.6.60.0100.07020.41
5.6.50.0100.07020.35
5.6.40.0000.08320.41
5.6.30.0000.05020.46
5.6.20.0070.07020.54
5.6.10.0070.08720.39
5.6.00.0070.05020.49
5.5.380.0130.06020.52
5.5.370.0170.07720.39
5.5.360.0030.08020.38
5.5.350.0070.08320.47
5.5.340.0100.08720.80
5.5.330.0030.08320.82
5.5.320.0030.08720.86
5.5.310.0100.08020.90
5.5.300.0070.07720.81
5.5.290.0170.07320.78
5.5.280.0200.07320.94
5.5.270.0100.06720.91
5.5.260.0100.08320.89
5.5.250.0070.07720.55
5.5.240.0170.05320.13
5.5.230.0100.07720.27
5.5.220.0100.05020.04
5.5.210.0100.03720.25
5.5.200.0070.07320.27
5.5.190.0030.07020.16
5.5.180.0070.07720.27
5.5.160.0100.07720.29
5.5.150.0070.07020.16
5.5.140.0130.05020.16
5.5.130.0070.04720.21
5.5.120.0100.06720.16
5.5.110.0030.04720.22
5.5.100.0000.08320.18
5.5.90.0000.07720.16
5.5.80.0130.08320.10
5.5.70.0130.07320.08
5.5.60.0070.05720.13
5.5.50.0030.06720.07
5.5.40.0100.04320.13
5.5.30.0070.03720.10
5.5.20.0030.08720.09
5.5.10.0030.08720.12
5.5.00.0130.07020.07
5.4.450.0130.06719.18
5.4.440.0100.08019.18
5.4.430.0200.06319.22
5.4.420.0100.07319.37
5.4.410.0130.07319.05
5.4.400.0170.06719.23
5.4.390.0070.07719.03
5.4.380.0170.07719.09
5.4.370.0070.04319.05
5.4.360.0100.06319.05
5.4.350.0030.07719.03
5.4.340.0070.07318.87
5.4.320.0130.06019.06
5.4.310.0200.06718.85
5.4.300.0000.08019.21
5.4.290.0070.08019.15
5.4.280.0130.07019.07
5.4.270.0030.07319.13
5.4.260.0130.03719.09
5.4.250.0100.07718.84
5.4.240.0100.07719.09
5.4.230.0100.06019.23
5.4.220.0130.06718.84
5.4.210.0130.04019.17
5.4.200.0030.08019.03
5.4.190.0170.06019.13
5.4.180.0130.07019.20
5.4.170.0070.07718.89
5.4.160.0130.03019.11
5.4.150.0170.06318.83
5.4.140.0030.07716.47
5.4.130.0030.07316.46
5.4.120.0030.05716.48
5.4.110.0030.07716.48
5.4.100.0070.07016.51
5.4.90.0100.07016.39
5.4.80.0070.05316.51
5.4.70.0070.05716.53
5.4.60.0130.07016.48
5.4.50.0100.06716.43
5.4.40.0030.07716.46
5.4.30.0030.05016.44
5.4.20.0070.05316.30
5.4.10.0030.06716.46
5.4.00.0070.06315.80
5.3.290.0000.08314.75
5.3.280.0130.07714.66
5.3.270.0170.05014.62
5.3.260.0100.07714.65
5.3.250.0030.04314.58
5.3.240.0100.06714.73
5.3.230.0100.07314.65
5.3.220.0030.06014.70
5.3.210.0130.06714.55
5.3.200.0070.08014.57
5.3.190.0030.08014.52
5.3.180.0000.08014.64
5.3.170.0130.07014.57
5.3.160.0130.08014.61
5.3.150.0200.05314.72
5.3.140.0100.07014.57
5.3.130.0070.07314.56
5.3.120.0100.07714.54
5.3.110.0200.06014.52
5.3.100.0070.07314.12
5.3.90.0100.06714.18
5.3.80.0100.06013.97
5.3.70.0100.07714.10
5.3.60.0100.05014.06
5.3.50.0030.08013.96
5.3.40.0030.08014.10
5.3.30.0070.07314.04
5.3.20.0030.08013.61
5.3.10.0100.07013.57
5.3.00.0130.06713.72
5.2.170.0000.06311.19
5.2.160.0070.05711.21
5.2.150.0030.04011.21
5.2.140.0030.06011.26
5.2.130.0130.05011.23
5.2.120.0000.05311.18
5.2.110.0070.05711.14
5.2.100.0100.05711.10
5.2.90.0100.05011.18
5.2.80.0030.06311.02
5.2.70.0030.06011.25
5.2.60.0100.06011.00
5.2.50.0000.06311.10
5.2.40.0130.05711.13
5.2.30.0030.06710.90
5.2.20.0070.06010.95
5.2.10.0030.04710.80
5.2.00.0030.05010.80
5.1.60.0030.05710.12
5.1.50.0070.0409.91
5.1.40.0030.05010.08
5.1.30.0030.06010.37
5.1.20.0030.05310.43
5.1.10.0030.04010.07
5.1.00.0070.0439.99
5.0.50.0030.0408.95
5.0.40.0070.0438.95
5.0.30.0070.0508.95
5.0.20.0030.0438.95
5.0.10.0030.0238.95
5.0.00.0030.0408.95
4.4.90.0100.0278.95
4.4.80.0100.0338.95
4.4.70.0070.0308.95
4.4.60.0000.0378.95
4.4.50.0030.0308.95
4.4.40.0000.0508.95
4.4.30.0030.0378.95
4.4.20.0030.0338.95
4.4.10.0070.0308.95
4.4.00.0030.0538.95
4.3.110.0100.0338.95
4.3.100.0000.0278.95
4.3.90.0000.0378.95
4.3.80.0070.0438.95
4.3.70.0000.0378.95
4.3.60.0000.0308.95
4.3.50.0030.0408.95
4.3.40.0000.0538.95
4.3.30.0000.0338.95
4.3.20.0000.0278.95
4.3.10.0030.0178.95
4.3.00.0000.0238.95

preferences:
48.92 ms | 401 KiB | 5 Q