3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $output = $preg_split('(/ /)', '1 2 3 4 5 6 7 8', 1); echo $output[0]; //will return whole string!; $output = $preg_split('(/ /)', '1 2 3 4 5 6 7 8', 2); echo $output[0]; //will return 1; echo $output[1]; //will return '2 3 4 5 6 7 8';
based on DXbpN
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: preg_split in /in/6KDGX on line 3 Fatal error: Uncaught Error: Function name must be a string in /in/6KDGX:3 Stack trace: #0 {main} thrown in /in/6KDGX on line 3
Process exited with code 255.
Output for 5.0.4 - 5.0.5, 5.1.1 - 5.6.28
Notice: Undefined variable: preg_split in /in/6KDGX on line 3 Fatal error: Function name must be a string in /in/6KDGX on line 3
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/6KDGX on line 10
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: preg_split in /in/6KDGX on line 3 Fatal error: Function name must be a string in /in/6KDGX on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined variable: preg_split in /in/6KDGX on line 3 Fatal error: Call to undefined function: () in /in/6KDGX on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Undefined variable: preg_split in /in/6KDGX on line 3 Fatal error: Call to undefined function: () in /in/6KDGX on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: preg_split in /in/6KDGX on line 3 Fatal error: Call to undefined function: () in /in/6KDGX on line 3