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) ); var_dump($chars); 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)
5.4.310.0040.04312.51
5.4.300.0040.04012.52
5.4.290.0080.04012.51
5.4.280.0110.03612.41
5.4.270.0040.04412.41
5.4.260.0060.03712.41
5.4.250.0080.03612.41
5.4.240.0090.03812.41
5.4.230.0080.03512.40
5.4.220.0030.03912.40
5.4.210.0070.03612.40
5.4.200.0060.04312.40
5.4.190.0070.03712.39
5.4.180.0050.04912.39
5.4.170.0050.03812.41
5.4.160.0070.04012.40
5.4.150.0100.03712.39
5.4.140.0090.03912.09
5.4.130.0100.03912.07
5.4.120.0070.03812.04
5.4.110.0050.04012.03
5.4.100.0120.04012.03
5.4.90.0050.04312.03
5.4.80.0050.03812.03
5.4.70.0090.04312.03
5.4.60.0080.03912.03
5.4.50.0070.03912.03
5.4.40.0050.04412.02
5.4.30.0080.03912.02
5.4.20.0050.04212.00
5.4.10.0070.03212.01
5.4.00.0070.03511.50
5.3.280.0050.04412.71
5.3.270.0100.04012.72
5.3.260.0100.03712.72
5.3.250.0050.04512.71
5.3.240.0080.04612.72
5.3.230.0070.04312.70
5.3.220.0090.03812.68
5.3.210.0130.04012.68
5.3.200.0040.04012.68
5.3.190.0080.03612.68
5.3.180.0110.03612.67
5.3.170.0060.04212.67
5.3.160.0070.03612.68
5.3.150.0070.04012.67
5.3.140.0070.04312.66
5.3.130.0040.04112.66
5.3.120.0090.04112.66
5.3.110.0100.04212.65
5.3.100.0130.03412.12
5.3.90.0050.03612.11
5.3.80.0040.03912.10
5.3.70.0130.03612.10
5.3.60.0050.03912.09
5.3.50.0060.04512.02
5.3.40.0080.03612.03
5.3.30.0060.03511.98
5.3.20.0080.04511.77
5.3.10.0090.03211.73
5.3.00.0060.03611.72
5.2.170.0040.0319.18
5.2.160.0090.0299.18
5.2.150.0070.0359.18
5.2.140.0090.0359.18
5.2.130.0050.0319.14
5.2.120.0080.0369.14
5.2.110.0080.0349.15
5.2.100.0100.0269.14
5.2.90.0070.0279.14
5.2.80.0070.0289.14
5.2.70.0050.0309.14
5.2.60.0060.0299.09
5.2.50.0020.0359.06
5.2.40.0080.0299.04
5.2.30.0040.0369.02
5.2.20.0040.0299.00
5.2.10.0070.0328.93
5.2.00.0060.0288.79
5.1.60.0090.0318.07
5.1.50.0060.0308.06
5.1.40.0070.0278.05
5.1.30.0070.0278.39
5.1.20.0070.0278.42
5.1.10.0080.0278.14
5.1.00.0050.0268.14
5.0.50.0030.0296.62
5.0.40.0050.0256.48
5.0.30.0060.0376.29
5.0.20.0040.0196.27
5.0.10.0040.0196.24
5.0.00.0030.0346.23
4.4.90.0020.0214.78
4.4.80.0040.0184.75
4.4.70.0050.0154.75
4.4.60.0040.0154.76
4.4.50.0050.0184.77
4.4.40.0050.0274.71
4.4.30.0030.0204.76
4.4.20.0040.0164.85
4.4.10.0050.0224.85
4.4.00.0010.0374.76
4.3.110.0010.0174.67
4.3.100.0020.0184.67
4.3.90.0010.0194.63
4.3.80.0030.0274.59
4.3.70.0020.0194.63
4.3.60.0070.0154.63
4.3.50.0020.0174.63
4.3.40.0050.0274.54
4.3.30.0020.0233.29
4.3.20.0010.0203.27
4.3.10.0020.0163.23
4.3.00.0070.01315.90

preferences:
140.73 ms | 1394 KiB | 7 Q