3v4l.org

run code in 300+ PHP versions simultaneously
<?php switch ('foo') { case 0: $result = "Oh no!\n"; break; case 'foo': $result = "This is what I expected\n"; break; } echo $result;

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.5.10.0080.01016.94
8.5.00.0140.00620.02
8.4.150.0030.00014.05
8.4.140.0120.00917.59
8.4.130.0050.00417.91
8.4.120.0120.00620.42
8.4.110.0040.00422.43
8.4.100.0110.00917.82
8.4.90.0100.01118.39
8.4.80.0070.00117.70
8.4.70.0050.00317.59
8.4.60.0240.00518.03
8.4.50.0270.00518.44
8.4.40.0320.00817.50
8.4.30.0310.00917.89
8.4.20.0320.00718.19
8.4.10.0270.00918.11
8.3.280.0110.00918.41
8.3.270.0070.01216.78
8.3.260.0140.00216.81
8.3.250.0100.00918.92
8.3.240.0130.00816.75
8.3.230.0150.00416.75
8.3.220.0050.00217.05
8.3.210.0130.00716.63
8.3.200.0250.00816.56
8.3.190.0260.00716.71
8.3.180.0270.00916.58
8.3.170.0290.00617.26
8.3.160.0220.00717.07
8.3.150.0220.00617.82
8.3.140.0220.00716.44
8.3.130.0240.00716.55
8.3.120.0250.00917.27
8.3.110.0230.00617.86
8.3.100.0260.00918.93
8.3.90.0250.00819.75
8.3.80.0260.00817.33
8.3.70.0320.00816.50
8.3.60.0280.00816.42
8.3.50.0230.00920.42
8.3.40.0320.00717.60
8.3.30.0200.00417.70
8.3.20.0230.00719.62
8.3.10.0210.00819.81
8.3.00.0180.00720.24
8.2.290.0130.00520.33
8.2.280.0230.00817.21
8.2.270.0230.00717.34
8.2.260.0220.01017.07
8.2.250.0240.00717.16
8.2.240.0200.00817.10
8.2.230.0210.00818.54
8.2.220.0260.00623.55
8.2.210.0220.00619.81
8.2.200.0220.00717.19
8.2.190.0240.00716.43
8.2.180.0240.00719.65
8.2.170.0240.00918.20
8.2.160.0240.00719.53
8.2.150.0250.00620.35
8.2.140.0240.00619.84
8.2.130.0250.00520.37
8.2.120.0280.00620.54
8.2.110.0170.00920.42
8.2.100.0200.00719.35
8.2.90.0210.00818.31
8.2.80.0200.00818.19
8.2.70.0230.00718.06
8.2.60.0220.00718.09
8.2.50.0230.00618.28
8.2.40.0170.00618.30
8.2.30.0180.00518.20
8.2.20.0180.00418.25
8.2.10.0200.00618.46
8.2.00.0190.00418.56
8.1.330.0110.00721.80
8.1.320.0250.00716.13
8.1.310.0240.01016.90
8.1.300.0240.00616.14
8.1.290.0190.00621.08
8.1.280.0210.00519.44
8.1.270.0170.00618.33
8.1.260.0210.00620.89
8.1.250.0190.00720.87
8.1.240.0130.00818.77
8.1.230.0120.00518.49
8.1.220.0150.00617.95
8.1.210.0130.00418.77
8.1.200.0120.00717.77
8.1.190.0130.00617.79
8.1.180.0140.00617.92
8.1.170.0120.00818.38
8.1.160.0170.00418.19
8.1.150.0160.00619.14
8.1.140.0160.00418.01
8.1.130.0130.00618.38
8.1.120.0130.00617.93
8.1.110.0130.00817.77
8.1.100.0150.00617.77
8.1.90.0150.00417.88
8.1.80.0160.00417.81
8.1.70.0110.00817.90
8.1.60.0150.00517.88
8.1.50.0160.00617.86
8.1.40.0120.00717.91
8.1.30.0140.00618.03
8.1.20.0150.00618.00
8.1.10.0130.00617.86
8.1.00.0160.00617.88
8.0.300.0160.00417.80
8.0.290.0150.00617.16
8.0.280.0190.00417.59
8.0.270.0140.00717.54
8.0.260.0190.00517.60
8.0.250.0200.00417.33
8.0.240.0150.00617.32
8.0.230.0140.00517.40
8.0.220.0140.00517.27
8.0.210.0120.00717.23
8.0.200.0180.00417.27
8.0.190.0170.00417.33
8.0.180.0150.00517.23
8.0.170.0170.00417.25
8.0.160.0140.00417.32
8.0.150.0120.00517.23
8.0.140.0160.00417.19
8.0.130.0120.00616.81
8.0.120.0170.00517.19
8.0.110.0170.00517.23
8.0.100.0130.00517.16
8.0.90.0150.00517.21
8.0.80.0130.00617.19
8.0.70.0150.00417.19
8.0.60.0110.00717.18
8.0.50.0140.00517.16
8.0.30.0150.00517.27
8.0.20.0140.00717.31
8.0.10.0140.00517.38
8.0.00.0100.00918.84
7.4.330.0120.00416.17
7.4.320.0120.00516.83
7.4.300.0140.00517.63
7.4.290.0110.00517.61
7.4.280.0150.00416.90
7.4.270.0140.00517.64
7.4.260.0130.00417.15
7.4.250.0130.00517.65
7.4.240.0110.00417.58
7.4.230.0130.00416.82
7.4.220.0110.00417.36
7.4.210.0080.00817.32
7.4.200.0090.00617.49
7.4.190.0140.00316.92
7.4.180.0120.00417.70
7.4.160.0100.00517.68
7.4.150.0120.00417.67
7.4.140.0130.00417.33
7.4.130.0120.00716.63
7.4.120.0130.00616.72
7.4.110.0160.00416.67
7.4.100.0140.00616.68
7.4.90.0170.00616.70
7.4.80.0180.00416.89
7.4.70.0140.00616.58
7.4.60.0130.00916.55
7.4.50.0140.00716.61
7.4.40.0130.00816.52
7.4.30.0110.00816.61
7.4.20.0110.00716.62
7.4.10.0110.00916.51
7.4.00.0140.00716.87
7.3.330.0110.00616.66
7.3.320.0150.00516.22
7.3.310.0160.00716.61
7.3.300.0180.00516.54
7.3.290.0140.00716.52
7.3.280.0150.00616.56
7.3.270.0190.00416.66
7.3.260.0160.00416.59
7.3.250.0190.00516.56
7.3.240.0140.00716.53
7.3.230.0140.00616.58
7.3.220.0150.00616.52
7.3.210.0140.00716.50
7.3.200.0150.00616.51
7.3.190.0120.00816.42
7.3.180.0100.01016.43
7.3.170.0150.00716.40
7.3.160.0140.00616.44
7.3.150.0130.00816.48
7.3.140.0140.00716.44
7.3.130.0150.00716.38
7.3.120.0160.00616.45
7.3.110.0140.00816.33
7.3.100.0130.00716.37
7.3.90.0120.00716.45
7.3.80.0120.00716.41
7.3.70.0130.00716.39
7.3.60.0110.00716.47
7.3.50.0130.00716.43
7.3.40.0120.00916.42
7.3.30.0140.00716.45
7.3.20.0160.00616.97
7.3.10.0170.00516.91
7.3.00.0150.00616.98
7.2.340.0110.00717.21
7.2.330.0140.00716.61
7.2.320.0160.00616.56
7.2.310.0140.00716.58
7.2.300.0150.00716.54
7.2.290.0140.00716.58
7.2.280.0160.00616.63
7.2.270.0160.00616.55
7.2.260.0150.00716.61
7.2.250.0140.00816.56
7.2.240.0140.00716.57
7.2.230.0140.00716.56
7.2.220.0150.00616.52
7.2.210.0120.00916.58
7.2.200.0160.00716.57
7.2.190.0150.00816.54
7.2.180.0120.00916.56
7.2.170.0130.00816.54
7.2.160.0130.00816.57
7.2.150.0260.00817.13
7.2.140.0150.00717.12
7.2.130.0150.00717.15
7.2.120.0160.00617.13
7.2.110.0160.00617.16
7.2.100.0160.00917.15
7.2.90.0160.00917.13
7.2.80.0170.00717.20
7.2.70.0150.00917.21
7.2.60.0150.00817.12
7.2.50.0160.00717.14
7.2.40.0160.00717.16
7.2.30.0170.00617.24
7.2.20.0140.00817.20
7.2.10.0170.00717.37
7.2.00.0140.00817.17

preferences:
90.41 ms | 403 KiB | 5 Q