3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "---\n title = A nice title goes here\n tags = tag1 tag2 tag3\n ---\n This is the content of this entry...\n Line2\n Line3\n" print_r(preg_split("/[\n]*[-]{3}[\n]/", $s, 3, PREG_SPLIT_NO_EMPTY)); print_r(preg_split("/[\n]*[-]{3}[\n]/", $s, 2, PREG_SPLIT_NO_EMPTY));
Output for 5.4.0 - 5.4.23
Parse error: syntax error, unexpected 'print_r' (T_STRING) in /in/SO7kc on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/SO7kc on line 10
Process exited with code 255.

preferences:
184.12 ms | 1395 KiB | 60 Q