3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/{@(?<func>\w+)(\((?<params>(?:[^()]++|(?2))*)\))}/u'; $str = 'строка с {@rand(1||{@rand(2|3|{@rand(4|5)})})} и {@rand(1|{@rand(2|3|{@rand(4|5)})})}.'; if (preg_match_all($re, $str, $matches, 0, PREG_SET_ORDER)) { print_r($matches["func"]); print_r($matches["params"]); }

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.70.0110.00717.00
8.3.60.0110.00718.30
8.3.50.0060.01620.02
8.3.40.0180.00418.88
8.3.30.0140.00418.83
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.180.0000.01525.92
8.2.170.0070.01119.11
8.2.160.0060.00922.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0030.00622.33
8.2.100.0040.00818.09
8.2.90.0040.00419.17
8.2.80.0060.00317.97
8.2.70.0030.00617.63
8.2.60.0050.00318.03
8.2.50.0030.00618.07
8.2.40.0030.00620.00
8.2.30.0040.00418.20
8.2.20.0000.00819.46
8.2.10.0070.00017.81
8.2.00.0040.00419.36
8.1.280.0070.01125.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0080.00423.65
8.1.230.0040.00820.97
8.1.220.0000.00917.74
8.1.210.0080.00018.77
8.1.200.0040.00717.60
8.1.190.0040.00417.48
8.1.180.0090.00018.10
8.1.170.0060.00320.42
8.1.160.0040.00418.90
8.1.150.0000.00718.82
8.1.140.0040.00417.54
8.1.130.0040.00417.55
8.1.120.0000.01017.57
8.1.110.0040.00417.54
8.1.100.0040.00417.56
8.1.90.0000.00717.55
8.1.80.0030.00617.48
8.1.70.0000.00717.49
8.1.60.0080.00017.61
8.1.50.0000.00817.52
8.1.40.0000.00717.60
8.1.30.0000.00817.67
8.1.20.0000.00817.63
8.1.10.0000.00717.73
8.1.00.0060.00317.71
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0040.00418.48
8.0.270.0080.00018.10
8.0.260.0040.00417.00
8.0.250.0000.00917.13
8.0.240.0000.00817.12
8.0.230.0000.00717.08
8.0.220.0080.00017.14
8.0.210.0040.00417.15
8.0.200.0040.00417.10
8.0.190.0030.00517.20
8.0.180.0040.00417.07
8.0.170.0050.00317.05
8.0.160.0090.00017.07
8.0.150.0000.00817.05
8.0.140.0040.00417.04
8.0.130.0030.00313.54
8.0.120.0030.00313.62
8.0.110.0060.00613.61
8.0.100.0100.00213.54
8.0.90.0100.00213.56
8.0.80.0040.00813.58
8.0.70.0130.00013.60
8.0.60.0060.00413.49
8.0.50.0040.00813.46
8.0.30.0110.00013.55
8.0.20.0060.00313.58
8.0.10.0000.00813.65
8.0.00.0040.00413.66
7.4.330.0000.00615.55
7.4.320.0040.00416.76
7.4.300.0000.00716.79
7.4.290.0040.00416.69
7.4.280.0040.00416.68
7.4.270.0040.00416.84
7.4.260.0000.00513.52
7.4.250.0040.00413.52
7.4.240.0090.00613.47
7.4.230.0060.00613.58
7.4.220.0090.00013.43
7.4.210.0120.00013.63
7.4.200.0070.00513.53
7.4.190.0100.00013.44
7.4.180.0080.00413.45
7.4.160.0060.00413.48
7.4.150.0130.00013.51
7.4.140.0070.00713.46
7.4.130.0060.00713.48
7.4.120.0070.00513.39
7.4.110.0030.00813.38
7.4.100.0040.00813.54
7.4.90.0100.00313.40
7.4.80.0090.00213.38
7.4.70.0000.01213.44
7.4.60.0120.00013.57
7.4.50.0060.00613.27
7.4.40.0110.00013.24
7.4.30.0060.00613.41
7.4.20.0080.00513.31
7.4.10.0120.00013.45
7.4.00.0080.00513.34
7.3.330.0030.00316.41
7.3.320.0070.00713.23
7.3.310.0100.00513.34
7.3.300.0120.00313.21
7.3.290.0090.00413.25
7.3.280.0140.00013.32
7.3.270.0140.00013.26
7.3.260.0140.00013.28
7.3.250.0040.00913.35
7.3.240.0110.00413.30
7.3.230.0090.00613.24
7.3.220.0100.00313.11
7.3.210.0110.00313.25
7.3.200.0060.00813.16
7.3.190.0150.00013.31
7.3.180.0140.00013.23
7.3.170.0120.00313.20
7.3.160.0150.00013.29
7.3.150.0130.00313.23
7.3.140.0040.00913.09
7.3.130.0130.00013.24
7.3.120.0080.00413.11
7.3.110.0050.00913.13
7.3.100.0080.00413.13
7.3.90.0120.00013.47
7.3.80.0040.00813.18
7.3.70.0110.00213.24
7.3.60.0120.00013.40
7.3.50.0110.00313.46
7.3.40.0090.00213.33
7.3.30.0040.00913.29
7.3.20.0040.00915.10
7.3.10.0130.00715.08
7.3.00.0040.01115.12

preferences:
52.31 ms | 400 KiB | 5 Q