3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $postcode = 'SW196QX'; // Validate the postcode if (preg_match( '/^GIR 0AA)|((([A-Z-[QVX]][0-9][0-9]?)|(([A-Z-[QVX]][A-Z-[IJZ]][0-9][0-9]?)|(([A-Z-[QVX]][0-9][A-HJKPSTUW])|([A-Z-[QVX]][A-Z-[IJZ]][0-9][ABEHMNPRVWXY])))) [0-9][A-Z-[CIKMOV]]{2})$/', $postcode ) === 1) { echo 'Invalid'; } else { echo 'Valid'; }

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.120.0260.00716.70
7.2.110.0410.00016.40
7.2.100.0170.00716.39
7.2.90.0210.00416.76
7.2.80.0200.01016.61
7.2.70.0230.00616.79
7.2.60.0130.00716.93
7.2.50.0160.01617.05
7.2.40.0090.01016.66
7.2.30.0150.01016.93
7.2.20.0220.00316.98
7.2.10.0160.00016.93
7.2.00.0180.00517.93
7.1.240.0210.00815.66
7.1.230.0180.00415.96
7.1.220.0230.01015.75
7.1.210.0160.00515.78
7.1.200.0070.00915.82
7.1.190.0220.01115.66
7.1.180.0160.00615.77
7.1.170.0230.00215.70
7.1.160.0090.01515.42
7.1.150.0260.00415.75
7.1.140.0170.00715.53
7.1.130.0180.00615.79
7.1.120.0290.00015.86
7.1.110.0190.00515.82
7.1.100.0160.00417.05
7.1.90.0270.00415.39
7.1.80.0220.00015.61
7.1.70.0110.00516.24
7.1.60.0150.00217.43
7.1.50.0110.00816.15
7.1.40.0140.00315.49
7.1.30.0170.01115.75
7.1.20.0130.00415.79
7.1.10.0200.00315.41
7.1.00.0100.03919.09
7.0.320.0230.00715.30
7.0.310.0170.00715.54
7.0.300.0160.00515.30
7.0.290.0230.00415.36
7.0.280.0200.00715.48
7.0.270.0160.00615.57
7.0.260.0200.01015.32
7.0.250.0050.01015.30
7.0.240.0130.00415.45
7.0.230.0210.00015.09
7.0.220.0130.01315.36
7.0.210.0090.00915.29
7.0.200.0140.00516.13
7.0.190.0200.00515.51
7.0.180.0130.01015.57
7.0.170.0170.00415.41
7.0.160.0100.00715.41
7.0.150.0110.01115.39
7.0.140.0130.00715.40
7.0.130.0340.00615.47
7.0.120.0260.00315.58
7.0.110.0070.00715.32
7.0.100.0170.00915.17
7.0.90.0180.00415.48
7.0.80.0290.00415.43
7.0.70.0060.01115.14
7.0.60.0090.03617.64
7.0.50.0050.02516.69
7.0.40.0130.02716.67
7.0.30.0300.02616.90
7.0.20.0170.04216.75
7.0.10.0100.04316.82
7.0.00.0090.03516.74
hhvm-3.22.00.1240.15390.28
hhvm-3.21.30.1290.12990.59
hhvm-3.21.00.1180.14489.57
hhvm-3.20.20.1100.14788.82
hhvm-3.19.20.0990.13988.28
hhvm-3.18.50.1230.15887.89
hhvm-3.18.40.1150.13988.15
hhvm-3.17.30.1300.12687.21
hhvm-3.15.40.0980.13284.77
hhvm-3.13.20.1220.17396.23
hhvm-3.12.140.1080.14195.07
hhvm-3.11.10.1110.14187.19
hhvm-3.10.10.0910.11184.30
5.6.380.0070.01014.26
5.6.370.0120.00414.20
5.6.360.0120.00614.74
5.6.350.0110.00614.65
5.6.340.0070.00814.07
5.6.330.0100.00614.40
5.6.320.0170.00014.60
5.6.310.0080.00814.07
5.6.300.0000.01714.08
5.6.290.0070.00714.30
5.6.280.0030.02917.54
5.6.270.0100.00814.54
5.6.260.0130.00314.31
5.6.250.0090.00614.60
5.6.240.0110.00714.32
5.6.230.0100.00714.08
5.6.220.0160.00314.23
5.6.210.0070.04917.47
5.6.200.0080.04416.36
5.6.190.0110.02217.38
5.6.180.0220.02917.49
5.6.170.0230.04117.33
5.6.160.0100.04417.40
5.6.150.0110.03516.26
5.6.140.0070.02616.39
5.6.130.0070.03116.33
5.6.120.0100.03617.81
5.6.110.0130.04417.73
5.6.100.0140.04017.55
5.6.90.0150.02317.60
5.6.80.0110.04217.40
5.6.70.2340.01817.44
5.6.60.0150.00314.18
5.6.50.0070.01514.40
5.6.40.0220.00414.33
5.6.30.0130.00914.19
5.6.20.0110.01114.02
5.6.10.0150.00914.18
5.6.00.0260.00014.33
5.5.380.0080.00411.09
5.5.370.0030.00811.09
5.5.360.0000.01211.09
5.5.350.0080.04215.77
5.5.340.0040.04214.48
5.5.330.0110.04115.69
5.5.320.0050.04515.68
5.5.310.0210.03515.68
5.5.300.0050.02814.65
5.5.290.0080.02014.63
5.5.280.0110.03516.04
5.5.270.0040.02515.98
5.5.260.0090.02015.98
5.5.250.0070.04215.79
5.5.240.0160.03015.72
5.5.230.0060.00611.09
5.5.220.0150.00011.09
5.5.210.0110.00011.09
5.5.200.0070.00711.09
5.5.190.0000.01011.09
5.5.180.0040.00811.20
5.5.170.0150.00314.27
5.5.160.0100.00311.09
5.5.150.0000.01811.09
5.5.140.0060.00611.16
5.5.130.0100.00011.09
5.5.120.0040.00811.11
5.5.110.0050.00611.09
5.5.100.0070.00411.09
5.5.90.0110.00011.09
5.5.80.0120.00011.09
5.5.70.0100.00511.09
5.5.60.0060.00311.09
5.5.50.0060.00611.09
5.5.40.0090.00611.09
5.5.30.0040.01011.21
5.5.20.0130.00011.09
5.5.10.0180.00011.09
5.5.00.0060.00411.09
5.4.450.0430.03215.27
5.4.440.0400.03015.23
5.4.430.0520.04415.29
5.4.420.0610.03315.41
5.4.410.0430.04015.22
5.4.400.0630.04214.95
5.4.390.0540.03914.93
5.4.380.0550.03915.15
5.4.370.0520.03815.11
5.4.360.0480.03814.94
5.4.350.0430.04415.09
5.4.340.0530.04015.12
5.4.330.0060.00611.09
5.4.320.0410.03115.11
5.4.310.0570.03914.95
5.4.300.0650.02515.23
5.4.290.0380.03415.10
5.4.280.0370.04115.12
5.4.270.0480.02615.12
5.4.260.0540.02815.20
5.4.250.0330.03815.15
5.4.240.0470.03315.18
5.4.230.0510.03715.11
5.4.220.0470.03115.03
5.4.210.0390.03415.17
5.4.200.0510.02515.16
5.4.190.0520.03915.19
5.4.180.0470.03815.11
5.4.170.0610.03015.10
5.4.160.0590.02515.02
5.4.150.0550.02915.16
5.4.140.0490.03113.63
5.4.130.0410.03313.67
5.4.120.0450.04013.67
5.4.110.0420.02813.79
5.4.100.0410.03513.73
5.4.90.0420.02513.78
5.4.80.0480.02613.78
5.4.70.0190.02113.74
5.4.60.0200.03013.73
5.4.50.0070.03813.66
5.4.40.0080.04013.73
5.4.30.0040.03913.65
5.4.20.0030.03913.75
5.4.10.0100.00511.09
5.4.00.0080.00811.09
5.3.290.1370.04014.75
5.3.280.1500.03714.64
5.3.270.1070.04714.57
5.3.260.1030.05014.44
5.3.250.1400.04714.46
5.3.240.0470.05014.54
5.3.230.1100.04714.46
5.3.220.0870.04014.51
5.3.210.0870.05014.35
5.3.200.0370.04314.54
5.3.190.0900.04314.51
5.3.180.0470.04314.61