3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Reman. 9mm Luger 125 gr. Match"; if(preg_match('/(9mm Luger|40 S&W|45 ACP)(.*Match)/',$string,$matches)){ $power_factor = 175; }else{ $power_factor = 0; } $ammunition = "Reman. 9mm Luger 115 gr. Target"; $grains = filter_var(substr($ammunition,$strcspn($ammunition,"gr")-4,4),FILTER_SANITIZE_NUMBER_INT); echo '['.$power_factor.'] ['.$grains.']';

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.40.0150.00019.05
8.3.30.0000.01519.05
8.3.20.0040.00420.19
8.3.10.0040.00421.65
8.3.00.0040.00423.49
8.2.170.0070.00722.96
8.2.160.0070.01020.52
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00821.30
8.2.120.0040.00426.35
8.2.110.0110.00721.08
8.2.100.0100.00317.80
8.2.90.0000.00819.08
8.2.80.0040.00417.97
8.2.70.0090.00017.73
8.2.60.0040.00417.80
8.2.50.0060.00318.07
8.2.40.0050.00520.64
8.2.30.0070.00019.38
8.2.20.0040.00417.74
8.2.10.0000.00717.99
8.2.00.0040.00418.00
8.1.270.0120.00321.93
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0090.00022.45
8.1.230.0140.00019.21
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0090.00017.22
8.1.190.0030.00517.35
8.1.180.0050.00518.10
8.1.170.0060.00318.63
8.1.160.0000.00720.64
8.1.150.0000.00718.86
8.1.140.0000.00819.45
8.1.130.0040.00417.57
8.1.120.0050.00317.57
8.1.110.0000.00717.57
8.1.100.0000.00817.53
8.1.90.0000.00817.43
8.1.80.0000.00817.57
8.1.70.0000.00717.55
8.1.60.0080.00017.66
8.1.50.0000.00917.56
8.1.40.0040.00717.55
8.1.30.0060.00317.80
8.1.20.0040.00417.70
8.1.10.0040.00417.73
8.1.00.0040.00417.51
8.0.300.0040.00418.77
8.0.290.0070.00016.88
8.0.280.0040.00418.46
8.0.270.0080.00017.09
8.0.260.0000.00717.21
8.0.250.0030.00317.10
8.0.240.0070.00016.99
8.0.230.0000.00716.98
8.0.220.0000.00716.93
8.0.210.0050.00317.05
8.0.200.0030.00317.11
8.0.190.0000.00817.07
8.0.180.0040.00417.07
8.0.170.0040.00417.12
8.0.160.0050.00217.11
8.0.150.0080.00017.05
8.0.140.0080.00016.98
8.0.130.0060.00013.34
8.0.120.0040.00416.89
8.0.110.0070.00016.94
8.0.100.0020.00516.98
8.0.90.0070.00016.97
8.0.80.0070.00816.94
8.0.70.0070.00016.91
8.0.60.0040.00416.93
8.0.50.0040.00416.99
8.0.30.0040.01417.32
8.0.20.0120.01017.45
8.0.10.0040.00417.27
8.0.00.0090.01016.84
7.4.330.0020.00216.86
7.4.320.0070.00016.69
7.4.300.0040.00416.80
7.4.290.0000.00716.64
7.4.280.0060.00316.84
7.4.270.0040.00416.61
7.4.260.0000.00513.43
7.4.250.0040.00416.63
7.4.240.0040.00416.80
7.4.230.0000.00716.84
7.4.220.0120.00616.77
7.4.210.0080.00916.72
7.4.200.0020.00516.70
7.4.160.0040.01716.53
7.4.150.0120.00617.40
7.4.140.0130.01217.86
7.4.130.0120.00716.68
7.4.120.0140.00616.71
7.4.110.0110.00716.95
7.4.100.0090.01016.73
7.4.90.0070.01116.66
7.4.80.0090.01319.39
7.4.70.0110.01116.66
7.4.60.0110.00516.75
7.4.50.0000.01616.88
7.4.40.0060.00916.63
7.4.30.0120.00616.64
7.4.00.0090.00614.97
7.3.330.0030.00313.30
7.3.320.0000.00613.21
7.3.310.0070.00016.27
7.3.300.0030.00316.42
7.3.290.0000.00716.39
7.3.280.0120.00716.40
7.3.270.0140.00417.40
7.3.260.0100.00716.41
7.3.250.0120.00816.55
7.3.240.0140.00316.66
7.3.230.0140.00316.64
7.3.210.0030.01316.71
7.3.200.0100.00719.39
7.3.190.0080.00816.37
7.3.180.0150.00616.45
7.3.170.0160.01016.84
7.3.160.0130.00316.36
7.3.10.0040.01216.76
7.3.00.0040.01116.55
7.2.330.0090.00916.45
7.2.320.0060.01016.61
7.2.310.0200.00316.68
7.2.300.0080.00816.50
7.2.290.0090.00616.54
7.2.130.0130.00316.97
7.2.120.0120.00316.98
7.2.110.0080.00416.66
7.2.100.0120.00316.78
7.2.90.0090.00317.04
7.2.80.0070.00717.05
7.2.70.0070.00717.01
7.2.60.0050.01016.62
7.2.50.0080.00816.36
7.2.40.0040.00716.87
7.2.30.0130.00316.99
7.2.20.0080.00616.88
7.2.10.0060.00617.04
7.2.00.0130.00818.17
7.1.250.0030.00715.97
7.1.200.0090.00416.00
7.1.100.0000.01318.38
7.1.70.0000.00817.43
7.1.60.0070.01119.28
7.1.50.0060.00917.13
7.1.00.0070.07322.29
7.0.200.0000.01117.08
7.0.60.0030.07721.65
7.0.50.0100.05017.90
7.0.40.0070.05320.21
7.0.30.0430.07020.14
7.0.20.0430.06720.21
7.0.10.0030.09320.05
7.0.00.0030.04320.19
5.6.280.0030.08020.91
5.6.210.0070.08020.66
5.6.200.0100.04018.13
5.6.190.0000.07020.48
5.6.180.0170.04720.48
5.6.170.0200.04320.38
5.6.160.0130.07320.48
5.6.150.0070.08018.18
5.6.140.0200.07718.13
5.6.130.0030.04018.11
5.6.120.0030.08021.14
5.6.110.0200.07021.01
5.6.100.0100.06021.11
5.6.90.0100.07721.09
5.6.80.0070.03720.40
5.5.350.3330.04320.44
5.5.340.0070.04018.00
5.5.330.0030.04020.37
5.5.320.0270.08020.27
5.5.310.0330.07020.30
5.5.300.0030.05017.95
5.5.290.0130.07717.88
5.5.280.0070.07320.77
5.5.270.0030.04320.64
5.5.260.0000.09020.86
5.5.250.0070.04320.68
5.5.240.0100.07320.15

preferences:
54.66 ms | 400 KiB | 5 Q