3v4l.org

run code in 300+ PHP versions simultaneously
<?php function timesTwo($num, $callback) { $num = $num*2; echo "num from timesTwo: ".$num.PHP_EOL; return call_user_func($callback, $num); } function addOne($num) { echo 'Num from add 1: '.$num.PHP_EOL; return $num + 1; } echo timesTwo(5, 'addOne'); ?>

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.0110.00718.43
8.3.50.0150.00016.15
8.3.40.0190.00318.75
8.3.30.0110.00318.70
8.3.20.0000.00819.20
8.3.10.0080.00020.91
8.3.00.0040.00417.93
8.2.180.0140.00316.63
8.2.170.0110.00422.96
8.2.160.0070.00719.13
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0040.00419.75
8.2.120.0070.00026.35
8.2.110.0090.00019.45
8.2.100.0110.00017.72
8.2.90.0000.00817.63
8.2.80.0040.00418.77
8.2.70.0000.00817.87
8.2.60.0080.00018.05
8.2.50.0000.00818.10
8.2.40.0040.00419.08
8.2.30.0030.00519.28
8.2.20.0080.00017.98
8.2.10.0040.00418.05
8.2.00.0040.00419.51
8.1.280.0110.01125.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00021.98
8.1.230.0040.00720.87
8.1.220.0080.00018.64
8.1.210.0080.00018.77
8.1.200.0000.00817.36
8.1.190.0080.00017.23
8.1.180.0030.00518.10
8.1.170.0050.00318.65
8.1.160.0000.00718.80
8.1.150.0050.00318.99
8.1.140.0040.00417.64
8.1.130.0030.00319.00
8.1.120.0040.00417.34
8.1.110.0050.00217.37
8.1.100.0040.00417.40
8.1.90.0040.00417.46
8.1.80.0000.00817.45
8.1.70.0080.00017.47
8.1.60.0080.00017.53
8.1.50.0070.00017.55
8.1.40.0030.00517.53
8.1.30.0000.00817.56
8.1.20.0050.00617.63
8.1.10.0000.00717.53
8.1.00.0060.00317.48
8.0.300.0070.00020.00
8.0.290.0040.00416.63
8.0.280.0030.00318.34
8.0.270.0000.00817.16
8.0.260.0070.00017.23
8.0.250.0030.00316.84
8.0.240.0100.00016.99
8.0.230.0030.00316.93
8.0.220.0030.00516.87
8.0.210.0030.00316.84
8.0.200.0030.00316.94
8.0.190.0000.00716.80
8.0.180.0080.00016.93
8.0.170.0040.00416.83
8.0.160.0000.00716.78
8.0.150.0040.00416.71
8.0.140.0070.00016.88
8.0.130.0000.00513.32
8.0.120.0040.00416.78
8.0.110.0000.00716.70
8.0.100.0040.00416.91
8.0.90.0070.00316.88
8.0.80.0150.00716.84
8.0.70.0080.00016.75
8.0.60.0000.00816.84
8.0.50.0040.00416.74
8.0.30.0080.00817.17
8.0.20.0090.00917.40
8.0.10.0040.00416.93
8.0.00.0120.01016.55
7.4.330.0050.00015.55
7.4.320.0030.00616.39
7.4.300.0070.00016.51
7.4.290.0070.00016.54
7.4.280.0030.00616.61
7.4.270.0070.00016.51
7.4.260.0030.00316.47
7.4.250.0030.00516.39
7.4.240.0060.00316.49
7.4.230.0080.00016.68
7.4.220.0040.00416.25
7.4.210.0080.01016.55
7.4.200.0030.00316.66
7.4.160.0020.01316.51
7.4.140.0120.00517.86
7.4.130.0110.01216.49
7.4.120.0090.01016.52
7.4.110.0130.00416.29
7.4.100.0030.01316.54
7.4.90.0140.00816.24
7.4.80.0110.00619.39
7.4.70.0100.00716.54
7.4.60.0120.00416.67
7.4.50.0070.00716.50
7.4.40.0120.00416.36
7.4.00.0000.01714.77
7.3.330.0030.00313.12
7.3.320.0000.00613.30
7.3.310.0070.00016.31
7.3.300.0020.00516.29
7.3.290.0000.00716.31
7.3.280.0080.00716.29
7.3.260.0100.00716.39
7.3.240.0120.00716.42
7.3.230.0080.00816.41
7.3.210.0170.00016.44
7.3.200.0130.00716.36
7.3.190.0030.01316.40
7.3.180.0090.00616.61
7.3.170.0170.00016.55
7.3.160.0060.00916.63
7.3.10.0070.00716.65
7.3.00.0030.00916.36
7.2.330.0090.00916.70
7.2.320.0090.00916.74
7.2.310.0070.01116.62
7.2.300.0030.01316.52
7.2.290.0120.00416.64
7.2.130.0000.01516.69
7.2.120.0040.00716.61
7.2.110.0100.00317.04
7.2.100.0060.00617.11
7.2.90.0120.00317.03
7.2.80.0050.00316.95
7.2.70.0080.00016.57
7.2.60.1280.00915.92
7.2.50.1140.00915.95
7.2.40.1270.01116.33
7.2.30.1290.01016.18
7.2.20.1420.00616.22
7.2.10.1230.01016.12
7.2.00.0970.01116.17
7.1.250.0000.01215.76
7.1.200.0060.00615.50
7.1.170.2570.00913.87
7.1.160.2330.01016.84
7.1.150.2660.01016.56
7.1.140.2570.00916.87
7.1.130.3190.01216.82
7.1.120.2980.01116.72
7.1.110.1740.00716.20
7.1.100.1530.01215.77
7.1.90.2860.01116.28
7.1.80.2250.00915.95
7.1.70.1590.01115.08
7.1.60.1660.01233.27
7.1.50.1900.01432.69
7.1.40.1890.01232.72
7.1.30.2340.01232.48
7.1.20.3490.01132.59
7.1.10.2420.00914.55
7.1.00.1590.00714.96

preferences:
54 ms | 400 KiB | 5 Q