3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 'foo'; switch ($foo) { case 'foo': echo "first foo\n"; case 'foo': echo "second foo\n"; default: echo "first default\n"; default: case 'foo': echo "second default\n"; }

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.06720.78
5.6.210.0070.04320.48
5.6.200.0030.08318.21
5.6.190.0070.04320.67
5.6.180.3370.04720.37
5.6.170.0270.07720.48
5.6.160.0070.07720.54
5.6.150.0030.08718.23
5.6.140.0000.04718.17
5.6.130.0070.05718.11
5.6.120.0070.05720.96
5.6.110.0070.04720.94
5.6.100.0070.05320.98
5.6.90.0100.03720.98
5.6.80.0100.08020.48
5.6.70.4270.03720.32
5.5.350.0230.07320.41
5.5.340.0030.04317.93
5.5.330.0130.03320.37
5.5.320.4070.04020.30
5.5.310.0330.06320.34
5.5.300.0100.03717.90
5.5.290.0070.03717.91
5.5.280.0170.05020.76
5.5.270.0030.04020.86
5.5.260.0100.05320.87
5.5.250.0070.07020.77
5.5.240.0170.03020.27
5.4.450.0600.05719.46
5.4.440.0470.04319.41
5.4.430.0470.05319.40
5.4.420.0670.03719.57
5.4.410.0130.04319.43
5.4.400.0270.03019.09
5.4.390.0170.05018.88
5.4.380.0730.06318.61
5.4.370.1000.06018.56
5.4.360.0730.05718.49
5.4.350.0730.05718.68
5.4.340.1100.05318.68
5.4.320.0110.04612.45
5.4.310.0070.04012.45
5.4.300.0050.03812.45
5.4.290.0110.03612.45
5.4.280.0070.03612.34
5.4.270.0060.03612.35
5.4.260.0030.04012.34
5.4.250.0080.03512.35
5.4.240.0050.04512.34
5.4.230.0070.04712.34
5.4.220.0060.05012.34
5.4.210.0110.03812.34
5.4.200.0070.04412.34
5.4.190.0060.04112.33
5.4.180.0050.04912.34
5.4.170.0050.03912.35
5.4.160.0100.03712.34
5.4.150.0080.03712.34
5.4.140.0060.04212.02
5.4.130.0040.04412.01
5.4.120.0070.03911.97
5.4.110.0070.04711.96
5.4.100.0040.03711.96
5.4.90.0080.03611.96
5.4.80.0030.04111.96
5.4.70.0050.03611.96
5.4.60.0080.03311.96
5.4.50.0100.03111.96
5.4.40.0070.03711.95
5.4.30.0080.03611.95
5.4.20.0060.03411.95
5.4.10.0030.03711.95
5.4.00.0050.03711.44
5.3.290.0070.04012.80
5.3.280.0050.03912.71
5.3.270.0070.03912.72
5.3.260.0040.04212.72
5.3.250.0060.03812.72
5.3.240.0040.04112.72
5.3.230.0050.04012.71
5.3.220.0090.03612.68
5.3.210.0050.04112.68
5.3.200.0070.03612.68
5.3.190.0060.04012.68
5.3.180.0080.03612.67
5.3.170.0090.03412.67
5.3.160.0100.04012.67
5.3.150.0080.05212.67
5.3.140.0090.04212.66
5.3.130.0080.04212.66
5.3.120.0090.05812.66
5.3.110.0140.04512.66
5.3.100.0090.04212.12
5.3.90.0080.05512.08
5.3.80.0100.04512.07
5.3.70.0080.04512.07
5.3.60.0090.04812.06
5.3.50.0040.04212.00
5.3.40.0050.04112.00
5.3.30.0050.04411.94
5.3.20.0160.04011.72
5.3.10.0080.04711.69
5.3.00.0120.05111.68
5.2.170.0090.0539.18
5.2.160.0090.0379.18
5.2.150.0080.0409.17
5.2.140.0080.0409.17
5.2.130.0050.0449.14
5.2.120.0060.0419.13
5.2.110.0100.0359.14
5.2.100.0070.0409.14
5.2.90.0060.0399.14
5.2.80.0070.0399.13
5.2.70.0070.0329.14
5.2.60.0050.0349.09
5.2.50.0070.0439.06
5.2.40.0040.0379.03
5.2.30.0030.0319.01
5.2.20.0050.0298.99
5.2.10.0050.0278.91
5.2.00.0060.0288.77
5.1.60.0060.0248.06
5.1.50.0050.0258.06
5.1.40.0060.0248.04
5.1.30.0030.0298.39
5.1.20.0100.0298.41
5.1.10.0030.0298.14
5.1.00.0060.0268.14
5.0.50.0080.0236.61
5.0.40.0050.0196.47
5.0.30.0020.0366.29
5.0.20.0040.0206.25
5.0.10.0060.0186.23
5.0.00.0070.0346.23
4.4.90.0020.0224.77
4.4.80.0050.0244.76
4.4.70.0030.0224.75
4.4.60.0060.0194.75
4.4.50.0050.0174.77
4.4.40.0030.0324.71
4.4.30.0030.0164.76
4.4.20.0020.0164.84
4.4.10.0040.0174.85
4.4.00.0030.0254.76
4.3.110.0020.0174.66
4.3.100.0010.0184.67
4.3.90.0020.0154.64
4.3.80.0010.0304.58
4.3.70.0020.0174.63
4.3.60.0020.0164.63
4.3.50.0040.0154.63
4.3.40.0040.0294.54
4.3.30.0040.0193.29
4.3.20.0050.0233.27
4.3.10.0040.0183.23
4.3.00.0030.01715.90

preferences:
149.9 ms | 1398 KiB | 8 Q