3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = " /\[ (?:block:(?<block>piechart)) (?: (?:\s+value:(?<value>[0-9]+)) | (?:\s+stroke:(?<stroke>[0-9]+)) | (?:\s+angle:(?<angle>[0-9]+)) | (?:\s+colorset:(?<colorset>reds|yellows|blues)) )* \]/xumi"; $subject = "here is a block to be replaced [block:piechart value:25 angle:0] [block] and another one [block:piechart colorset:reds value:20]"; preg_replace_callback($pattern, 'callbackFunction', $subject, -1, $count, PREG_UNMATCHED_AS_NULL); function callbackFunction($matches) { var_dump(array_filter($matches, function ($v) { return !is_null($v); })); // process matched values, return some replacement... $replacement = "..."; return $replacement; };

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.0060.00917.98
8.4.120.0030.00623.91
8.4.110.0100.00822.38
8.4.100.0040.00518.99
8.4.90.0100.01217.70
8.4.80.0160.00517.94
8.4.70.0040.00417.94
8.4.60.0090.01218.78
8.4.50.0060.00418.86
8.4.40.0130.00723.89
8.4.30.0110.00018.72
8.4.20.0100.01018.73
8.4.10.0130.00021.78
8.3.260.0130.00716.99
8.3.250.0090.01019.16
8.3.240.0080.00717.16
8.3.230.0050.00417.02
8.3.220.0100.00517.43
8.3.210.0110.00817.02
8.3.200.0130.00717.18
8.3.190.0070.01117.30
8.3.180.0090.01016.73
8.3.170.0080.00018.86
8.3.160.0060.01216.89
8.3.150.0100.01017.22
8.3.140.0080.00016.87
8.3.130.0060.00317.07
8.3.120.0030.00520.91
8.3.110.0100.00316.79
8.3.100.0100.01016.93
8.3.90.0120.00326.77
8.3.80.0090.00316.74
8.3.70.0110.00717.00
8.3.60.0090.00618.53
8.3.50.0040.01118.53
8.3.40.0060.00920.60
8.3.30.0040.01118.79
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0090.01020.50
8.2.280.0080.00818.73
8.2.270.0000.00819.06
8.2.260.0130.00618.99
8.2.250.0080.00018.52
8.2.240.0070.01016.56
8.2.230.0060.00320.94
8.2.220.0030.00624.06
8.2.210.0120.00626.77
8.2.200.0030.00616.75
8.2.190.0070.00718.54
8.2.180.0130.00325.92
8.2.170.0140.00719.33
8.2.160.0040.01122.96
8.2.150.0030.00525.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0060.00320.95
8.2.110.0070.00319.30
8.2.100.0060.00618.16
8.2.90.0040.00418.15
8.2.80.0030.00619.09
8.2.70.0040.00417.75
8.2.60.0050.00317.91
8.2.50.0050.00318.04
8.2.40.0040.00418.34
8.2.30.0000.00718.14
8.2.20.0040.00420.50
8.2.10.0040.00418.14
8.2.00.0000.00719.43
8.1.330.0080.00521.91
8.1.320.0110.00916.20
8.1.310.0110.00818.47
8.1.300.0040.01618.68
8.1.290.0060.00330.84
8.1.280.0120.00325.92
8.1.270.0060.00923.99
8.1.260.0030.00626.35
8.1.250.0070.00328.09
8.1.240.0040.01421.08
8.1.230.0030.00719.10
8.1.220.0050.00318.03
8.1.210.0030.00719.16
8.1.200.0030.00617.73
8.1.190.0030.00517.73
8.1.180.0000.00919.00
8.1.170.0050.00317.72
8.1.160.0030.00619.06
8.1.150.0060.00318.73
8.1.140.0050.00317.76
8.1.130.0070.00017.74
8.1.120.0040.00417.71
8.1.110.0030.00517.66
8.1.100.0050.00317.71
8.1.90.0000.00717.61
8.1.80.0000.00817.70
8.1.70.0060.00217.65
8.1.60.0110.00817.70
8.1.50.0120.00617.73
8.1.40.0050.00917.61
8.1.30.0140.00317.87
8.1.20.0190.00017.77
8.1.10.0110.00717.71
8.1.00.0140.00517.65
8.0.300.0070.00020.11
8.0.290.0030.00617.13
8.0.280.0030.00318.37
8.0.270.0030.00317.06
8.0.260.0030.00317.05
8.0.250.0050.00217.07
8.0.240.0000.00817.08
8.0.230.0030.00317.02
8.0.220.0050.00317.09
8.0.210.0040.00417.11
8.0.200.0050.01017.23
8.0.190.0070.00717.07
8.0.180.0120.00417.03
8.0.170.0110.00417.04
8.0.160.0140.00017.16
8.0.150.0040.01116.92
8.0.140.0080.00817.01
8.0.130.0130.00317.16
8.0.120.0090.00617.20
8.0.110.0050.01017.08
8.0.100.0070.00817.16
8.0.90.0120.00317.10
8.0.80.0110.00417.05
8.0.70.0090.00617.19
8.0.60.0110.00217.04
8.0.50.0040.01217.18
8.0.30.0090.00417.04
8.0.20.0130.00017.15
8.0.10.0090.00417.19
7.4.330.0030.00315.55
7.4.320.0060.00016.86
7.4.300.0030.00616.80
7.4.290.0100.00316.90
7.4.280.0160.00016.75
7.4.270.0120.00616.71
7.4.260.0150.00216.92
7.4.250.0170.00016.80
7.4.240.0120.00616.81
7.4.230.0110.00316.80
7.4.220.0100.00216.71
7.4.210.0110.00316.81
7.4.200.0060.00916.79
7.4.190.0090.00516.89
7.4.180.0130.00316.87
7.4.160.0090.00616.84
7.4.150.0110.00416.82
7.4.140.0170.00016.60
7.4.130.0060.00816.89
7.4.120.0140.00016.68
7.4.110.0130.00316.76
7.4.100.0160.00016.83
7.4.90.0110.00416.73
7.4.80.0050.01016.64
7.4.70.0000.01316.79
7.4.60.0100.00316.55
7.4.50.0070.00516.67
7.4.40.0070.00716.78
7.4.30.0140.00016.72
7.4.20.0140.00016.66
7.4.10.0130.00016.73
7.4.00.0060.00916.86

preferences:
28.33 ms | 403 KiB | 5 Q