3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=2; $b=0; switch($a) { case 1: default: $b += 1; break; default: $b += 2; } echo $b; //output would be 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)
5.6.280.0070.07021.09
5.6.210.0130.07320.72
5.6.200.0170.07318.12
5.6.190.0130.08020.27
5.6.180.0230.03720.56
5.6.170.0400.06020.48
5.6.160.0300.06020.71
5.6.150.0100.04318.09
5.6.140.0030.05718.07
5.6.130.0030.05018.22
5.6.120.0100.03321.08
5.6.110.0000.04321.08
5.6.100.0070.05721.01
5.6.90.0070.07321.09
5.6.80.0100.07020.41
5.5.350.0030.05020.40
5.5.340.0070.08317.98
5.5.330.0070.08320.57
5.5.320.0270.04320.27
5.5.310.0270.04320.33
5.5.300.0030.06017.98
5.5.290.0070.04017.95
5.5.280.0100.05320.73
5.5.270.0000.09020.86
5.5.260.0130.08020.88
5.5.250.0100.07320.58
5.5.240.0300.07320.23
5.4.450.0330.05719.41
5.4.440.0470.04319.45
5.4.430.0400.04019.48
5.4.420.0500.04319.45
5.4.410.0300.03719.28
5.4.400.0430.04019.24
5.4.390.0270.04719.09
5.4.380.0870.05718.61
5.4.370.1000.05318.56
5.4.360.0930.05318.56
5.4.350.0800.05318.66
5.4.340.0670.06018.60
5.4.320.0070.04012.45
5.4.310.0060.03812.45
5.4.300.0080.03412.45
5.4.290.0070.04812.45
5.4.280.0070.03812.34
5.4.270.0050.03712.35
5.4.260.0060.04212.34
5.4.250.0060.03612.35
5.4.240.0030.03912.35
5.4.230.0050.03912.34
5.4.220.0070.03512.34
5.4.210.0060.03712.34
5.4.200.0040.03912.34
5.4.190.0080.03412.33
5.4.180.0050.03712.34
5.4.170.0040.03712.35
5.4.160.0120.03512.34
5.4.150.0060.04112.34
5.4.140.0060.03912.02
5.4.130.0070.04712.01
5.4.120.0040.04211.96
5.4.110.0060.03511.96
5.4.100.0070.03311.96
5.4.90.0040.04011.96
5.4.80.0060.03611.96
5.4.70.0070.03511.96
5.4.60.0050.03611.96
5.4.50.0050.03611.96
5.4.40.0050.04011.95
5.4.30.0050.03811.95
5.4.20.0020.04411.95
5.4.10.0040.03611.94
5.4.00.0050.03711.44
5.3.290.0040.04812.80
5.3.280.0080.03812.70
5.3.270.0060.04912.72
5.3.260.0080.04412.72
5.3.250.0070.03712.72
5.3.240.0070.03612.72
5.3.230.0070.03712.71
5.3.220.0080.03612.68
5.3.210.0080.03812.68
5.3.200.0090.03312.68
5.3.190.0040.04012.68
5.3.180.0050.03812.67
5.3.170.0080.03512.67
5.3.160.0080.03512.68
5.3.150.0090.04012.68
5.3.140.0050.03912.66
5.3.130.0060.03912.66
5.3.120.0030.04312.66
5.3.110.0050.04012.66
5.3.100.0060.03712.11
5.3.90.0080.03412.09
5.3.80.0070.03512.07
5.3.70.0060.03912.07
5.3.60.0060.03712.07
5.3.50.0060.03612.00
5.3.40.0060.03612.00
5.3.30.0060.04311.94
5.3.20.0060.03611.72
5.3.10.0050.03611.69
5.3.00.0040.04011.67

preferences:
143.39 ms | 1386 KiB | 7 Q