3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = '<p>www.test.com</p>'; echo 'pcre.backtrack_limit: ' . ini_get('pcre.backtrack_limit') . PHP_EOL; $chunks = preg_split('/(<.+?>)/is', $text, -1, PREG_SPLIT_DELIM_CAPTURE); echo 'error: ' . preg_last_error() . PHP_EOL; is_array($chunks) ? print_r($chunks) : var_dump($chunks); ini_set('pcre.backtrack_limit', 1); echo 'pcre.backtrack_limit: ' . ini_get('pcre.backtrack_limit') . PHP_EOL; $chunks = preg_split('/(<.+?>)/is', $text, -1, PREG_SPLIT_DELIM_CAPTURE); echo 'error: ' . preg_last_error() . PHP_EOL; is_array($chunks) ? print_r($chunks) : var_dump($chunks);

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.140.0120.00316.79
8.3.130.0080.00018.74
8.3.120.0040.00418.96
8.3.110.0120.00020.94
8.3.100.0030.00616.55
8.3.90.0040.00426.77
8.3.80.0070.00416.63
8.3.70.0070.01516.58
8.3.60.0180.00416.63
8.3.50.0090.01216.69
8.3.40.0090.00620.11
8.3.30.0110.00418.96
8.3.20.0000.00724.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.250.0080.00017.02
8.2.240.0090.00917.31
8.2.230.0050.01422.58
8.2.220.0040.00424.06
8.2.210.0000.00726.77
8.2.200.0090.00016.63
8.2.190.0110.01116.63
8.2.180.0120.00316.63
8.2.170.0090.00918.91
8.2.160.0140.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0070.00321.31
8.2.100.0030.01018.04
8.2.90.0060.00319.28
8.2.80.0060.00317.97
8.2.70.0040.00417.75
8.2.60.0040.00417.75
8.2.50.0030.00617.75
8.2.40.0060.00517.71
8.2.30.0080.00817.62
8.2.20.0100.00617.68
8.2.10.0090.00817.62
8.2.00.0150.00317.75
8.1.300.0040.00416.23
8.1.290.0080.00330.84
8.1.280.0070.01125.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0000.01022.20
8.1.230.0040.00719.15
8.1.220.0040.00417.88
8.1.210.0040.00418.77
8.1.200.0050.00317.60
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0070.00317.62
8.1.160.0120.00317.62
8.1.150.0130.00317.62
8.1.140.0090.00817.62
8.1.130.0110.00617.62
8.1.120.0100.00617.62
8.1.110.0130.00317.62
8.1.100.0100.00817.62
8.1.90.0120.00417.62
8.1.80.0100.00617.62
8.1.70.0100.00617.62
8.1.60.0170.00117.62
8.1.50.0110.00617.62
8.1.40.0100.00717.62
8.1.30.0100.00717.68
8.1.20.0110.00517.62
8.1.10.0130.00417.62
8.1.00.0130.00517.62
8.0.300.0080.00018.77
8.0.290.0040.00416.75
8.0.280.0090.00417.62
8.0.270.0110.00817.62
8.0.260.0110.00617.62
8.0.250.0090.00617.62
8.0.240.0130.00417.62
8.0.230.0110.00617.62
8.0.220.0130.00417.62
8.0.210.0130.00317.62
8.0.200.0080.00817.62
8.0.190.0120.00417.62
8.0.180.0140.00217.62
8.0.170.0130.00417.62
8.0.160.0110.00517.62
8.0.150.0100.00617.62
8.0.140.0100.00517.62
8.0.130.0150.00117.62
8.0.120.0150.00217.62
8.0.110.0130.00317.62
8.0.100.0120.00417.62
8.0.90.0120.00417.62
8.0.80.0120.00417.62
8.0.70.0160.00117.62
8.0.60.0080.00717.62
8.0.50.0050.01217.62
8.0.30.0110.00517.62
8.0.20.0110.00417.62
8.0.10.0120.00317.62
7.4.330.0070.00217.62
7.2.340.0060.00417.70
5.6.400.0040.00617.62
5.3.290.0050.00317.62

preferences:
54.2 ms | 403 KiB | 5 Q