3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=3; $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.0100.06721.04
5.6.210.0070.07720.56
5.6.200.0030.04718.21
5.6.190.0130.08320.68
5.6.180.3900.03720.57
5.6.170.0200.06720.71
5.6.160.0070.08720.52
5.6.150.0070.06718.10
5.6.140.0030.04018.10
5.6.130.0030.05318.26
5.6.120.0070.05321.11
5.6.110.0070.04020.98
5.6.100.0030.06020.97
5.6.90.0070.06321.00
5.6.80.0100.07720.42
5.6.70.4330.04320.29
5.5.350.0270.06320.46
5.5.340.0000.04318.02
5.5.330.0100.03720.40
5.5.320.5200.04020.25
5.5.310.0230.07720.28
5.5.300.0070.04317.96
5.5.290.0100.07317.95
5.5.280.0070.04720.96
5.5.270.0000.09320.79
5.5.260.0030.08720.76
5.5.250.0070.07720.77
5.5.240.0330.06020.12
5.4.450.0630.04719.57
5.4.440.0470.04719.18
5.4.430.0270.04719.38
5.4.420.0300.03319.42
5.4.410.0830.03019.25
5.4.400.0270.03319.21
5.4.390.0330.03719.16
5.4.380.0970.06318.64
5.4.370.0770.06318.63
5.4.360.0830.05318.61
5.4.350.0600.06318.53
5.4.340.0970.06018.69
5.4.320.0070.04212.45
5.4.310.0040.04012.45
5.4.300.0060.04312.46
5.4.290.0070.04212.45
5.4.280.0050.04612.34
5.4.270.0060.04012.34
5.4.260.0050.04112.34
5.4.250.0080.03712.35
5.4.240.0070.03712.35
5.4.230.0080.04812.34
5.4.220.0060.03612.34
5.4.210.0100.03812.34
5.4.200.0070.04012.34
5.4.190.0060.04512.33
5.4.180.0080.04612.33
5.4.170.0100.03912.34
5.4.160.0100.03512.34
5.4.150.0060.04712.34
5.4.140.0110.03812.02
5.4.130.0100.03812.01
5.4.120.0080.04011.97
5.4.110.0070.04111.96
5.4.100.0070.04411.96
5.4.90.0050.04511.96
5.4.80.0040.03911.96
5.4.70.0100.04211.96
5.4.60.0060.03511.96
5.4.50.0070.03911.96
5.4.40.0080.03611.95
5.4.30.0070.03711.95
5.4.20.0030.05311.95
5.4.10.0080.03611.95
5.4.00.0040.04811.44
5.3.290.0050.04712.80
5.3.280.0080.04112.71
5.3.270.0080.04212.73
5.3.260.0050.04112.72
5.3.250.0060.05012.71
5.3.240.0100.03512.72
5.3.230.0070.03912.71
5.3.220.0060.03912.68
5.3.210.0110.03512.68
5.3.200.0090.05012.68
5.3.190.0090.04312.68
5.3.180.0080.03912.67
5.3.170.0030.04012.67
5.3.160.0070.03612.68
5.3.150.0070.04012.67
5.3.140.0060.04012.66
5.3.130.0070.04812.65
5.3.120.0130.04412.66
5.3.110.0120.04412.65
5.3.100.0070.04612.12
5.3.90.0060.03912.08
5.3.80.0100.04212.07
5.3.70.0060.04112.08
5.3.60.0080.05112.06
5.3.50.0030.04012.00
5.3.40.0080.03912.00
5.3.30.0080.03511.94
5.3.20.0050.03811.72
5.3.10.0100.03211.69
5.3.00.0070.03511.67

preferences:
145.9 ms | 1394 KiB | 7 Q