3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = "/^((?:\d{2}\.?){3}).*?(\w{2}\s\d{4}).*?(\d{2}:\d{2})(?:.*?(\b[a-z]+\b).*?(\b[a-z]+\b))?$/m"; $str = "A N K U N F T 11.08.15 *** NEUBUCHUNG *** 11.08.15 xxx xxx X3 2830 14:25 17:50 18.08.15 xxx xxx X3 2831 18:40 F882129 dsdsaidsaia F882129 xxxyxyagydaysd A N K U N F T 18.08.15 *** NEUBUCHUNG *** 11.08.15 xxx xxx X3 2830 14:25 17:50 18.08.15 xxx xxx X3 2831 18:40 F881554 ZXCXZCXCXZCCXZ F881554 xcvcxvcxvcvxc F881554 xvcxvcxcvxxvccvxxcv 11.08.15 xxx xxx X3 2830 14:25 17:50 18.08.15 xxx xxx X3 2831 18:40 F881605 xczxcdfsfdsdfs F881605 zxccxzxzdffdsfds "; $re = "/(?:\sF\d+.*?\n\n)(\n)/"; $subst = ">>CUT HERE>>"; $result = preg_split($re, $subst, $str); echo $result; ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught TypeError: preg_split(): Argument #3 ($limit) must be of type int, string given in /in/Ll40D:29 Stack trace: #0 /in/Ll40D(29): preg_split('/(?:\\sF\\d+.*?\n\n...', '>>CUT HERE>>', 'A N K U N F T ...') #1 {main} thrown in /in/Ll40D on line 29
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: preg_split() expects parameter 3 to be int, string given in /in/Ll40D on line 29
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33
Warning: preg_split() expects parameter 3 to be integer, string given in /in/Ll40D on line 29
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Warning: preg_split() expects parameter 3 to be long, string given in /in/Ll40D on line 29
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Array

preferences:
346.83 ms | 402 KiB | 455 Q