3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = 'S1G5AB'; // given this $store = '5I6GAB'; // actually this $regex = implode('', array_map( function ($char) { static $map = ['S'=>'[S5]','5'=>'[S5]','1'=>'[1I]','I'=>'[1I]','G'=>'[6G]','6'=>'[6G]']; return array_key_exists($char, $map) ? $map[$char] : $char; }. str_split($input) )); echo $regex . PHP_EOL; echo (0 < preg_match("/$regex/", $store) ? 'Match' : 'No match');

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.3.60.0100.01018.45
8.3.50.0080.00722.79
8.3.40.0040.01118.82
8.3.30.0110.00419.18
8.3.20.0040.00420.34
8.3.10.0040.00421.73
8.3.00.0040.00717.63
8.2.180.0180.00425.92
8.2.170.0070.00722.96
8.2.160.0100.00320.52
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00020.89
8.2.110.0030.00722.12
8.2.100.0040.00817.84
8.2.90.0060.00318.16
8.2.80.0050.00317.97
8.2.70.0000.00817.92
8.2.60.0040.00418.22
8.2.50.0030.00518.10
8.2.40.0050.00320.66
8.2.30.0000.00819.16
8.2.20.0040.00417.80
8.2.10.0040.00418.23
8.2.00.0000.00717.81
8.1.280.0100.00325.92
8.1.270.0040.00423.86
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.92
8.1.230.0060.00920.78
8.1.220.0050.00317.74
8.1.210.0040.00418.78
8.1.200.0030.00617.48
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0030.00618.63
8.1.160.0000.00822.06
8.1.150.0060.00318.90
8.1.140.0000.00717.36
8.1.130.0030.00317.74
8.1.120.0070.00017.47
8.1.110.0050.00317.37
8.1.100.0020.00517.46
8.1.90.0040.00417.52
8.1.80.0000.00917.36
8.1.70.0030.00317.41
8.1.60.0060.00317.59
8.1.50.0030.00617.44
8.1.40.0030.00617.54
8.1.30.0000.00817.61
8.1.20.0040.00417.54
8.1.10.0000.00817.56
8.1.00.0030.00617.48
8.0.300.0060.00319.51
8.0.290.0030.00616.75
8.0.280.0070.00018.43
8.0.270.0000.00717.26
8.0.260.0050.00317.27
8.0.250.0070.00017.04
8.0.240.0030.00616.92
8.0.230.0100.00017.03
8.0.220.0030.00316.96
8.0.210.0030.00416.91
8.0.200.0000.00916.80
8.0.190.0070.00016.92
8.0.180.0040.00416.97
8.0.170.0060.00316.96
8.0.160.0030.00616.77
8.0.150.0040.00416.92
8.0.140.0040.00416.84
8.0.130.0000.00513.38
8.0.120.0080.00016.91
8.0.110.0050.00216.89
8.0.100.0040.00417.00
8.0.90.0000.00716.90
8.0.80.0120.00916.95
8.0.70.0040.00416.98
8.0.60.0000.00716.92
8.0.50.0040.00417.04
8.0.30.0100.01217.24
8.0.20.0180.00817.40
8.0.10.0000.00717.09
8.0.00.0090.01116.80
7.4.330.0030.00315.00
7.4.320.0000.00716.49
7.4.300.0060.00016.58
7.4.290.0000.00716.61
7.4.280.0000.00816.47
7.4.270.0030.00316.51
7.4.260.0030.00316.59
7.4.250.0000.00716.46
7.4.240.0060.00116.54
7.4.230.0030.00316.51
7.4.220.0070.01116.55
7.4.210.0070.01116.46
7.4.200.0070.00016.35
7.4.160.0040.01216.35
7.4.150.0060.01217.40
7.4.140.0090.00917.86
7.4.130.0060.01316.45
7.4.120.0060.01116.61
7.4.110.0090.01016.35
7.4.100.0110.00616.54
7.4.90.0070.01016.72
7.4.80.0070.01019.39
7.4.70.0150.01016.43
7.4.60.0060.01016.66
7.4.50.0040.00416.59
7.4.40.0110.00616.48
7.4.30.0050.01116.56
7.4.00.0070.01015.13
7.3.330.0040.00413.20
7.3.320.0000.00513.14
7.3.310.0000.00716.13
7.3.300.0030.00316.21
7.3.290.0090.00616.28
7.3.280.0100.00816.30
7.3.270.0120.00617.40
7.3.260.0110.00816.21
7.3.240.0120.00616.58
7.3.230.0140.00316.42
7.3.210.0090.01516.38
7.3.200.0160.00919.39
7.3.190.0100.01316.20
7.3.180.0080.00816.60
7.3.170.0070.01016.39
7.3.160.0120.00316.31
7.2.330.0140.00316.66
7.2.320.0110.00616.49
7.2.310.0080.00816.64
7.2.300.0070.01016.68
7.2.290.0060.01616.21
7.2.60.0040.00816.92
7.2.00.0070.00718.91
7.1.200.0090.00315.93
7.1.100.0170.01018.24
7.1.70.0000.00917.00
7.1.60.0100.01319.40
7.1.50.0030.00916.78
7.1.00.0070.07322.44
7.0.200.0000.00716.73
7.0.140.0000.07722.09
7.0.60.0100.03320.01
7.0.50.0030.05017.85
7.0.40.0070.08320.14
7.0.30.0270.04020.07
7.0.20.0170.04320.11
7.0.10.0070.08720.23
7.0.00.0030.09320.18
5.6.280.0130.06320.87
5.6.210.0100.08020.75
5.6.200.0030.07018.19
5.6.190.0070.04720.64
5.6.180.0330.07320.39
5.6.170.0200.04020.54
5.6.160.0030.04320.57
5.6.150.0130.06718.29
5.6.140.0200.06718.28
5.6.130.0070.08018.19
5.6.120.0070.08721.10
5.6.110.0000.05721.02
5.6.100.0130.07020.89
5.6.90.0070.04020.88
5.6.80.0130.08020.52
5.5.350.0100.07020.43
5.5.340.0070.03317.96
5.5.330.0130.06720.13
5.5.320.0100.07720.34
5.5.310.0100.05020.20
5.5.300.0100.07318.09
5.5.290.0130.07718.10
5.5.280.0130.06020.80
5.5.270.0000.08020.84
5.5.260.0030.04020.87
5.5.250.0100.07320.62
5.5.240.0230.02720.19
5.4.450.0570.05019.55
5.4.440.0100.06319.63
5.4.430.0200.05319.47
5.4.420.0130.05319.57
5.4.410.0230.06719.40
5.4.400.0170.05019.13
5.4.390.0130.05319.29
5.4.380.0270.06718.75
5.4.370.0070.03718.59
5.4.360.0170.02718.79
5.4.350.0230.10312.02
5.4.340.0070.03712.02
5.4.320.0050.04612.50
5.4.310.0090.05212.50
5.4.300.0070.03612.50
5.4.290.0040.04012.50
5.4.280.0060.03712.40
5.4.270.0060.04212.39
5.4.260.0060.03812.39
5.4.250.0060.03712.39
5.4.240.0070.03712.39
5.4.230.0050.04412.39
5.4.220.0100.04212.39
5.4.210.0100.03212.39
5.4.200.0080.04012.39
5.4.190.0060.03712.38
5.4.180.0090.04012.38
5.4.170.0090.03412.39
5.4.160.0060.03612.39
5.4.150.0070.03712.39
5.4.140.0060.03712.07
5.4.130.0070.03412.06
5.4.120.0080.04012.01
5.4.110.0090.03612.01
5.4.100.0040.04012.01
5.4.90.0090.04612.01
5.4.80.0130.03612.01
5.4.70.0090.03612.01
5.4.60.0050.03812.01
5.4.50.0050.04112.01
5.4.40.0060.04112.00
5.4.30.0110.03012.00
5.4.20.0060.03412.00
5.4.10.0070.03311.99
5.4.00.0070.03411.49
5.3.290.0060.04212.80
5.3.280.0070.05012.71
5.3.270.0070.03612.72
5.3.260.0090.04212.72
5.3.250.0050.04812.72
5.3.240.0100.03912.72
5.3.230.0090.04112.71
5.3.220.0100.03812.68
5.3.210.0100.04112.68
5.3.200.0050.04112.68
5.3.190.0120.03512.68
5.3.180.0090.04412.68
5.3.170.0110.03512.67
5.3.160.0100.03612.67
5.3.150.0110.04012.67
5.3.140.0090.03412.66
5.3.130.0080.04712.66
5.3.120.0080.03812.66
5.3.110.0090.04012.65
5.3.100.0080.03612.12
5.3.90.0060.04612.11
5.3.80.0090.03812.10
5.3.70.0070.03912.10
5.3.60.0060.03812.09
5.3.50.0070.04812.03
5.3.40.0110.03812.03
5.3.30.0090.04011.98
5.3.20.0060.04211.77
5.3.10.0060.04611.73
5.3.00.0090.03411.72
5.2.170.0030.0359.18
5.2.160.0080.0259.18
5.2.150.0040.0319.18
5.2.140.0040.0529.18
5.2.130.0040.0309.14
5.2.120.0060.0319.14
5.2.110.0060.0309.15
5.2.100.0030.0309.14
5.2.90.0040.0299.14
5.2.80.0090.0269.14
5.2.70.0050.0319.14
5.2.60.0040.0319.09
5.2.50.0060.0309.06
5.2.40.0060.0289.04
5.2.30.0050.0299.02
5.2.20.0080.0259.00
5.2.10.0040.0368.92
5.2.00.0070.0318.79
5.1.60.0050.0248.07
5.1.50.0060.0318.07
5.1.40.0050.0298.05
5.1.30.0050.0258.39
5.1.20.0050.0338.42
5.1.10.0040.0258.14
5.1.00.0070.0358.14
5.0.50.0060.0226.62
5.0.40.0060.0206.48
5.0.30.0030.0376.29
5.0.20.0060.0196.26
5.0.10.0050.0246.24
5.0.00.0040.0296.23
4.4.90.0030.0234.78
4.4.80.0050.0174.76
4.4.70.0030.0194.76
4.4.60.0050.0234.75
4.4.50.0030.0204.77
4.4.40.0030.0274.71
4.4.30.0070.0154.75
4.4.20.0050.0164.84
4.4.10.0020.0184.85
4.4.00.0020.0294.76
4.3.110.0040.0164.67
4.3.100.0040.0164.66
4.3.90.0030.0174.64
4.3.80.0040.0244.59
4.3.70.0060.0174.63
4.3.60.0040.0184.63
4.3.50.0030.0154.63
4.3.40.0060.0274.54
4.3.30.0020.0213.29
4.3.20.0000.0203.27
4.3.10.0030.0143.23
4.3.00.0000.0277.20

preferences:
44.58 ms | 401 KiB | 5 Q