3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = ["(AAA/)(BBB/)(cc)", "(AAA/)xxxx(BBB/)(cc)"]; foreach ($strings as $string) { if (!preg_match('~^(?:\([\w\\/-]+\))+$~', $string)) { echo "The simple pattern $string is not valid!"; // throw new \Exception("The simple pattern $string is not valid!"); } else { var_export(preg_split('~\)\K~', $string, 0, PREG_SPLIT_NO_EMPTY)); } echo "\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)
8.4.130.0100.00118.65
8.4.120.0130.00818.77
8.4.110.0040.00522.19
8.4.100.0110.00717.90
8.4.90.0100.01020.46
8.4.80.0120.00618.84
8.4.70.0090.01119.14
8.4.60.0100.01020.56
8.4.50.0110.00920.38
8.4.40.0130.00017.98
8.4.30.0040.00820.38
8.4.20.0170.00318.88
8.4.10.0030.00617.85
8.3.250.0040.00416.99
8.3.240.0100.01016.89
8.3.230.0130.00616.61
8.3.220.0050.00418.91
8.3.210.0120.00716.65
8.3.200.0090.00816.96
8.3.190.0060.00217.41
8.3.180.0090.00819.04
8.3.170.0060.01319.05
8.3.160.0000.01816.87
8.3.150.0170.00316.79
8.3.140.0040.00416.69
8.3.130.0040.00416.98
8.3.120.0070.01018.79
8.3.110.0060.00320.94
8.3.100.0070.00724.06
8.3.90.0110.00726.77
8.3.80.0070.00316.88
8.3.70.0040.01116.63
8.3.60.0120.00316.63
8.3.50.0030.01418.43
8.3.40.0120.00318.92
8.3.30.0150.00018.70
8.3.20.0000.00724.18
8.3.10.0060.00324.66
8.3.00.0040.00426.16
8.2.290.0130.00717.07
8.2.280.0110.00818.74
8.2.270.0030.00616.68
8.2.260.0040.01517.20
8.2.250.0060.00318.75
8.2.240.0050.00519.05
8.2.230.0030.00622.58
8.2.220.0030.00637.54
8.2.210.0000.00826.77
8.2.200.0060.00317.00
8.2.190.0070.00716.58
8.2.180.0110.00425.92
8.2.170.0110.00419.04
8.2.160.0100.00322.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00826.16
8.2.110.0030.00619.31
8.2.100.0030.00917.81
8.2.90.0050.00319.22
8.2.80.0080.00417.97
8.2.70.0040.00417.63
8.2.60.0000.00817.93
8.2.50.0060.00318.07
8.2.40.0000.01118.03
8.2.30.0040.00418.09
8.2.20.0040.00417.98
8.2.10.0040.00419.27
8.2.00.0040.00419.20
8.1.330.0050.00516.63
8.1.320.0130.00616.03
8.1.310.0120.00616.69
8.1.300.0120.00616.34
8.1.290.0060.00318.88
8.1.280.0120.00325.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0060.00322.67
8.1.230.0070.00317.83
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.38
8.1.180.0030.00618.10
8.1.170.0040.00418.76
8.1.160.0040.00418.97
8.1.150.0080.00018.87
8.1.140.0000.00818.92
8.1.130.0080.00020.36
8.1.120.0000.00717.54
8.1.110.0000.00817.54
8.1.100.0030.00617.60
8.1.90.0040.00417.64
8.1.80.0040.00417.66
8.1.70.0070.00017.55
8.1.60.0000.00817.61
8.1.50.0040.00417.62
8.1.40.0040.00417.71
8.1.30.0030.00517.69
8.1.20.0000.00817.73
8.1.10.0050.00317.61
8.1.00.0040.00417.61
8.0.300.0000.00718.77
8.0.290.0040.00416.88
8.0.280.0000.00718.46
8.0.270.0070.00018.12
8.0.260.0070.00018.58
8.0.250.0040.00417.15
8.0.240.0050.00217.13
8.0.230.0030.00517.18
8.0.220.0070.00016.97
8.0.210.0030.00317.00
8.0.200.0040.00417.15
8.0.190.0030.00617.21
8.0.180.0040.00417.12
8.0.170.0060.00317.12
8.0.160.0040.00417.08
8.0.150.0000.00717.00
8.0.140.0070.00317.10
8.0.130.0000.00713.46
8.0.120.0050.00317.04
8.0.110.0000.00717.09
8.0.100.0040.00417.20
8.0.90.0050.00217.04
8.0.80.0060.00917.09
8.0.70.0080.00816.98
8.0.60.0060.00917.09
8.0.50.0110.00416.97
8.0.30.0110.00317.06
8.0.20.0030.01117.17
8.0.10.0000.01417.15
8.0.00.0040.01217.18
7.4.330.0000.00516.86
7.4.320.0040.00416.64
7.4.300.0000.00716.82
7.4.290.0000.00716.65
7.4.280.0000.00816.71
7.4.270.0040.00416.86
7.4.260.0030.00313.42
7.4.250.0070.00016.68
7.4.240.0040.00316.73
7.4.230.0040.00416.79
7.4.220.0000.00716.92
7.4.210.0090.00916.73
7.4.200.0030.01116.75
7.4.190.0140.00016.83
7.4.180.0070.00716.65
7.4.160.0000.01416.70
7.4.150.0060.00816.89
7.4.140.0110.00316.68
7.4.130.0070.00716.70
7.4.120.0080.00816.88
7.4.110.0070.00716.71
7.4.100.0030.01016.71
7.4.90.0070.00716.82
7.4.80.0000.01316.65
7.4.70.0060.00616.68
7.4.60.0100.00316.80
7.4.50.0030.01016.70
7.4.40.0030.01116.57
7.4.30.0030.01016.75
7.4.20.0030.01116.77
7.4.10.0030.01016.49
7.4.00.0070.00716.64
7.3.330.0000.00816.53
7.3.320.0030.00313.28
7.3.310.0050.00216.50
7.3.300.0000.00616.52
7.3.290.0070.00716.57
7.3.280.0000.01316.48
7.3.270.0030.01016.48
7.3.260.0050.00916.48
7.3.250.0070.00716.49
7.3.240.0050.00916.45
7.3.230.0110.00316.56
7.3.220.0110.00316.33
7.3.210.0070.00616.29
7.3.200.0030.01016.33
7.3.190.0040.01116.30
7.3.180.0070.00716.37
7.3.170.0080.00516.41
7.3.160.0030.01016.28
7.3.150.0030.01016.34
7.3.140.0070.00716.33
7.3.130.0050.00916.23
7.3.120.0030.01016.50
7.3.110.0030.01016.38
7.3.100.0100.01316.29
7.3.90.0060.01016.71
7.3.80.0070.00716.43
7.3.70.0070.00716.63
7.3.60.0040.01016.53
7.3.50.0070.00716.64
7.3.40.0060.00916.60
7.3.30.0030.01016.59
7.3.20.0110.00316.59
7.3.10.0090.00616.55
7.3.00.0030.01216.50

preferences:
149.99 ms | 403 KiB | 5 Q