3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dontSwitch($option) { $actions = array( '*' => 'multiply', '/' => 'divide' ); return call_user_func($actions[$option]); } function multiply() { return 'fuuuuu'; } function divide() { return 'dump'; } echo dontSwitch('*');

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.40.0040.01118.54
8.3.30.0070.00719.04
8.3.20.0050.00320.21
8.3.10.0000.00822.09
8.3.00.0040.00422.51
8.2.170.0140.00022.96
8.2.160.0030.01020.53
8.2.150.0080.00024.18
8.2.140.0110.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.36
8.2.110.0000.00922.20
8.2.100.0080.00319.45
8.2.90.0000.00819.38
8.2.80.0040.00419.66
8.2.70.0000.00817.48
8.2.60.0030.00618.05
8.2.50.0050.00518.07
8.2.40.0000.00718.34
8.2.30.0040.00418.11
8.2.20.0000.00717.67
8.2.10.0000.00817.55
8.2.00.0030.00617.73
8.1.270.0090.00021.95
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0060.00323.73
8.1.230.0120.00019.14
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0100.00017.22
8.1.190.0040.00417.41
8.1.180.0040.00418.10
8.1.170.0050.00518.61
8.1.160.0000.00721.93
8.1.150.0040.00418.56
8.1.140.0000.00717.38
8.1.130.0050.00217.78
8.1.120.0020.00517.39
8.1.110.0000.00717.39
8.1.100.0000.00717.37
8.1.90.0040.00417.24
8.1.80.0080.00017.41
8.1.70.0040.00417.33
8.1.60.0070.00417.63
8.1.50.0040.00417.49
8.1.40.0000.00817.56
8.1.30.0000.00717.53
8.1.20.0080.00017.65
8.1.10.0030.00517.54
8.1.00.0040.00417.46
8.0.300.0000.00718.77
8.0.290.0000.00717.16
8.0.280.0000.00818.41
8.0.270.0000.00817.31
8.0.260.0060.00016.82
8.0.250.0040.00416.93
8.0.240.0040.00416.81
8.0.230.0030.00316.79
8.0.220.0000.00716.79
8.0.210.0000.00716.78
8.0.200.0000.00816.79
8.0.190.0000.00716.76
8.0.180.0030.00316.74
8.0.170.0030.00516.80
8.0.160.0040.00416.70
8.0.150.0000.00716.77
8.0.140.0030.00516.80
8.0.130.0050.00013.31
8.0.120.0040.00416.66
8.0.110.0040.00416.83
8.0.100.0000.00716.72
8.0.90.0040.00416.71
8.0.80.0060.01016.76
8.0.70.0040.00416.84
8.0.60.0050.00316.84
8.0.50.0070.00016.70
8.0.30.0140.00616.94
8.0.20.0140.00917.40
8.0.10.0000.00816.82
8.0.00.0130.01116.71
7.4.330.0030.00315.00
7.4.320.0030.00316.51
7.4.300.0030.00316.59
7.4.290.0040.00416.43
7.4.280.0000.00716.49
7.4.270.0000.00716.55
7.4.260.0000.00716.43
7.4.250.0040.00416.35
7.4.240.0040.00316.59
7.4.230.0030.00316.71
7.4.220.0100.00716.38
7.4.210.0100.00516.59
7.4.200.0000.00716.38
7.4.190.0000.00816.76
7.4.160.0080.00816.47
7.4.150.0070.01617.40
7.4.140.0130.00617.86
7.4.130.0130.00316.47
7.4.120.0110.00616.47
7.4.110.0070.01016.41
7.4.100.0130.01016.68
7.4.90.0130.01016.30
7.4.80.0030.01419.39
7.4.70.0080.00816.66
7.4.60.0060.01016.41
7.4.50.0030.00516.46
7.4.40.0030.00922.77
7.4.30.0090.01316.59
7.4.00.0120.00415.10
7.3.330.0020.00213.10
7.3.320.0000.00513.00
7.3.310.0050.00216.16
7.3.300.0000.00716.15
7.3.290.0070.00716.25
7.3.280.0110.00916.21
7.3.270.0140.00317.40
7.3.260.0060.01716.36
7.3.250.0050.01216.52
7.3.240.0170.00716.45
7.3.230.0130.00616.39
7.3.210.0120.00416.54
7.3.200.0070.01019.39
7.3.190.0030.01316.34
7.3.180.0050.01116.29
7.3.170.0130.00316.43
7.3.160.0110.00716.28
7.3.120.0030.00614.74
7.2.330.0130.00516.60
7.2.320.0090.00916.64
7.2.310.0170.00716.41
7.2.300.0100.01416.46
7.2.290.0040.01416.52
7.2.00.0070.00419.29
7.1.100.0150.00017.68
7.1.70.0070.00316.99
7.1.60.0160.00619.82
7.1.50.0030.01216.52
7.1.00.0070.07322.46
7.0.200.0070.00316.77
7.0.140.0100.06722.00
7.0.110.0300.05719.96
7.0.100.0570.07320.09
7.0.90.0200.04019.84
7.0.80.0100.04320.06
7.0.70.0170.05719.90
7.0.60.0170.04319.64
7.0.50.0200.04020.33
7.0.40.0100.06720.27
7.0.30.0070.04320.24
7.0.20.0100.04020.22
7.0.10.0030.04320.04
7.0.00.0030.04319.93
5.6.280.0100.06720.93
5.6.250.0100.04720.69
5.6.240.0030.04320.64
5.6.230.0070.03720.67
5.6.220.0070.05720.70
5.6.210.0030.05020.64
5.6.200.0070.03721.00
5.6.190.0200.07021.04
5.6.180.0100.03721.20
5.6.170.0070.04020.95
5.6.160.0030.04021.20
5.6.150.0130.03021.30
5.6.140.0070.04321.04
5.6.130.0100.03721.22
5.6.120.0070.04720.95
5.6.110.0070.05321.05
5.6.100.0030.04321.12
5.6.90.0070.04021.13
5.6.80.0030.06020.66
5.6.70.0100.03320.34
5.6.60.0030.04020.43
5.6.50.0070.05020.34
5.6.40.0000.09320.29
5.6.30.0200.05020.42
5.6.20.0100.04720.50
5.6.10.0170.06020.34
5.6.00.0170.04020.50
5.5.380.0030.04020.25
5.5.370.0030.04020.59
5.5.360.0000.04320.57
5.5.350.0100.03720.45
5.5.340.0030.05320.91
5.5.330.0100.03721.02
5.5.320.0030.04020.71
5.5.310.0070.04020.78
5.5.300.0100.03320.78
5.5.290.0070.07320.98
5.5.280.0100.06320.75
5.5.270.0000.04320.86
5.5.260.0000.04320.90
5.5.250.0100.03720.86
5.5.240.0100.03720.41
5.5.230.0130.03020.13
5.5.220.0100.04020.13
5.5.210.0030.04320.40
5.5.200.0030.08720.39
5.5.190.0200.06720.23
5.5.180.0070.05020.25
5.5.160.0030.08020.24
5.5.150.0070.05720.32
5.5.140.0130.05320.13
5.5.130.0030.09320.30
5.5.120.0070.07320.10
5.5.110.0070.03720.30
5.5.100.0130.06320.21
5.5.90.0170.06320.05
5.5.80.0030.08020.02
5.5.70.0030.07720.27
5.5.60.0100.04020.24
5.5.50.0200.06719.99
5.5.40.0170.06020.25
5.5.30.0100.06719.97
5.5.20.0070.08319.97
5.5.10.0330.04320.16
5.5.00.0100.07719.93
5.4.450.0070.06719.32
5.4.440.0100.03719.55
5.4.430.0030.04019.63
5.4.420.0130.03019.36
5.4.410.0000.04019.53
5.4.400.0030.03718.99
5.4.390.0000.04019.02
5.4.380.0030.04019.02
5.4.370.0070.03718.95
5.4.360.0100.07719.18
5.4.350.0070.07318.98
5.4.340.0130.06319.16
5.4.320.0070.05719.16
5.4.310.0030.07319.19
5.4.300.0070.07718.95
5.4.290.0100.06019.00
5.4.280.0030.04718.97
5.4.270.0070.06319.33
5.4.260.0100.05719.19
5.4.250.0100.07319.15
5.4.240.0030.08319.13
5.4.230.0100.07019.02
5.4.220.0100.06719.16
5.4.210.0000.08319.00
5.4.200.0030.07019.33
5.4.190.0000.05018.94
5.4.180.0170.06319.32
5.4.170.0130.03319.17
5.4.160.0070.07719.20
5.4.150.0000.06718.98
5.4.140.0070.03716.49
5.4.130.0070.07016.53
5.4.120.0130.07316.55
5.4.110.0100.07316.37
5.4.100.0170.06316.59
5.4.90.0070.07016.53
5.4.80.0100.06716.50
5.4.70.0100.06716.54
5.4.60.0030.05716.54
5.4.50.0100.07016.33
5.4.40.0070.07016.59
5.4.30.0100.06716.48
5.4.20.0030.07316.54
5.4.10.0100.06716.28
5.4.00.0030.06715.80
5.3.290.0100.06714.76
5.3.280.0030.08014.82
5.3.270.0070.06014.84
5.3.260.0070.06314.60
5.3.250.0030.06714.73
5.3.240.0030.06314.63
5.3.230.0070.06014.46
5.3.220.0070.07014.55
5.3.210.0200.06314.80
5.3.200.0070.07314.71
5.3.190.0070.07314.54
5.3.180.0070.05714.59
5.3.170.0030.07714.54
5.3.160.0100.07714.58
5.3.150.0070.07314.69
5.3.140.0070.07714.41
5.3.130.0100.04314.59
5.3.120.0100.04314.52
5.3.110.0070.04314.56
5.3.100.0030.05714.19
5.3.90.0170.06714.11
5.3.80.0070.07314.15
5.3.70.0070.07314.16
5.3.60.0030.06714.00
5.3.50.0070.07714.02
5.3.40.0100.06713.90
5.3.30.0070.07013.93
5.3.20.0170.06713.84
5.3.10.0070.06713.68
5.3.00.0130.06313.73
5.2.170.0030.04711.22
5.2.160.0070.06311.28
5.2.150.0100.04311.13
5.2.140.0000.05011.36
5.2.130.0030.06011.23
5.2.120.0000.06311.08
5.2.110.0030.06711.24
5.2.100.0100.04011.24
5.2.90.0070.03011.24
5.2.80.0100.05711.18
5.2.70.0130.05311.32
5.2.60.0000.05011.14
5.2.50.0000.06311.04
5.2.40.0000.06311.23
5.2.30.0030.04310.96
5.2.20.0070.06010.94
5.2.10.0070.05011.01
5.2.00.0070.05710.67
5.1.60.0170.04310.07
5.1.50.0030.05310.07
5.1.40.0000.06010.23
5.1.30.0130.05010.42
5.1.20.0070.05710.59
5.1.10.0030.05310.25
5.1.00.0100.04710.06
5.0.50.0030.0478.95
5.0.40.0000.0278.95
5.0.30.0130.0578.95
5.0.20.0030.0338.95
5.0.10.0070.0238.95
5.0.00.0030.0608.95
4.4.90.0030.0308.95
4.4.80.0070.0308.95
4.4.70.0000.0278.95
4.4.60.0000.0338.95
4.4.50.0000.0378.95
4.4.40.0000.0338.95
4.4.30.0070.0338.95
4.4.20.0030.0378.95
4.4.10.0030.0308.95
4.4.00.0130.0438.95
4.3.110.0070.0338.95
4.3.100.0100.0238.95
4.3.90.0000.0378.95
4.3.80.0000.0308.95
4.3.70.0000.0378.95
4.3.60.0130.0238.95
4.3.50.0070.0238.95
4.3.40.0030.0508.95
4.3.30.0000.0378.95
4.3.20.0000.0378.95
4.3.10.0100.0278.95
4.3.00.0070.0278.95

preferences:
39.78 ms | 400 KiB | 5 Q