3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rSplitReverse($string) { preg_match_all("/\(((?:(?>[^()]+)|(?R))*)\)/", $string, $matches); foreach ($matches[1] as &$m) { if (preg_match_all("/(\((?:(?>[^()]+)|(?R))*\))|[^(),]+/", $m, $items, PREG_SET_ORDER)) { $first = array_shift($items)[0]; foreach ($items as &$item) { $item = isset($item[1]) ? rSplitReverse($item[0]) : $item[0]; } $m = "$first," . implode(',', array_reverse($items)); } } return '(' . implode('),(', array_reverse($matches[1])) . ')'; } echo rSplitReverse('(X,1,1,3),(X,1,1,3),(X,@2,@2,@2,@2,@2,(Y,1))');

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.5.00.0130.00920.43
8.4.150.0020.00014.05
8.4.140.0150.00817.86
8.4.130.0050.00418.62
8.4.120.0120.00824.04
8.4.110.0080.00918.98
8.4.100.0130.00818.04
8.4.90.0130.00420.59
8.4.80.0070.00320.77
8.4.70.0060.00420.70
8.4.60.0030.00720.79
8.4.50.0140.00618.57
8.4.40.0060.00317.60
8.4.30.0160.00318.93
8.4.20.0030.01421.55
8.4.10.0130.00319.65
8.3.280.0100.01018.72
8.3.270.0140.00716.93
8.3.260.0100.01016.74
8.3.250.0120.00718.88
8.3.240.0130.00617.07
8.3.230.0100.01016.96
8.3.220.0120.00718.96
8.3.210.0110.01018.60
8.3.200.0070.00216.65
8.3.190.0110.00616.99
8.3.180.0130.00618.81
8.3.170.0120.00619.04
8.3.160.0080.00417.35
8.3.150.0060.01417.27
8.3.140.0080.00017.32
8.3.130.0000.00917.06
8.3.120.0140.00320.77
8.3.110.0090.00316.94
8.3.100.0040.00418.40
8.3.90.0050.00326.77
8.3.80.0030.00617.97
8.3.70.0510.00317.97
8.3.60.0320.00817.97
8.3.50.0190.00017.97
8.3.40.0230.00017.97
8.3.30.0250.00317.97
8.3.20.0080.01217.97
8.3.10.0180.00317.97
8.3.00.0140.00617.97
8.2.290.0080.01120.21
8.2.280.0080.00620.00
8.2.270.0070.01117.27
8.2.260.0150.00018.51
8.2.250.0040.00416.82
8.2.240.0030.00617.26
8.2.230.0060.00320.94
8.2.220.0040.00424.06
8.2.210.0100.00026.77
8.2.200.0040.00418.79
8.2.190.0130.00817.97
8.2.180.0180.00417.97
8.2.170.0170.00717.97
8.2.160.0200.00317.97
8.2.150.0200.00517.97
8.2.140.0190.00417.97
8.2.130.0280.00017.97
8.2.120.0320.00017.97
8.2.110.0170.00617.97
8.2.100.0210.00317.97
8.2.90.0270.01517.97
8.2.80.0280.00817.97
8.2.70.0140.00917.97
8.2.60.0260.00317.97
8.2.50.0180.00717.97
8.2.40.0220.00417.97
8.2.30.0140.00717.97
8.2.20.0170.00417.97
8.2.10.0150.00617.97
8.2.00.0190.00417.97
8.1.330.0080.00422.08
8.1.320.0110.00818.52
8.1.310.0100.00016.54
8.1.300.0050.00316.68
8.1.290.0060.00330.84
8.1.280.0180.00517.97
8.1.270.0190.00517.97
8.1.260.0160.00717.97
8.1.250.0140.01017.97
8.1.240.0150.00717.97
8.1.230.0230.00317.97
8.1.220.0220.00017.97
8.1.210.0180.00317.97
8.1.200.0160.00417.97
8.1.190.0210.00017.97
8.1.180.0160.00617.97
8.1.170.0160.01317.97
8.1.160.0350.01217.97
8.1.150.0190.01917.97
8.1.140.0370.00317.97
8.1.130.0300.00917.97
8.1.120.0190.00617.97
8.1.110.0130.01317.97
8.1.100.0110.00917.97
8.1.90.0130.00917.97
8.1.80.0140.00617.97
8.1.70.0180.00617.97
8.1.60.0250.00317.97
8.1.50.0290.01317.97
8.1.40.0280.01717.97
8.1.30.0340.01417.97
8.1.20.0370.01117.97
8.1.10.0230.01617.97
8.1.00.0270.00717.97

preferences:
38.12 ms | 403 KiB | 5 Q