3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = 'CORN FUTURE May14'; $data = preg_split('\s', $s); array_pop($data); $name = trim(implode(' ', $data)); echo $name;
Output for 5.3.0 - 7.1.0
Warning: preg_split(): Delimiter must not be alphanumeric or backslash in /in/fvWmX on line 4 Warning: array_pop() expects parameter 1 to be array, boolean given in /in/fvWmX on line 5 Warning: implode(): Invalid arguments passed in /in/fvWmX on line 6
Output for 5.2.5 - 5.2.17
Warning: preg_split(): Delimiter must not be alphanumeric or backslash in /in/fvWmX on line 4 Warning: array_pop(): The argument should be an array in /in/fvWmX on line 5 Warning: implode(): Invalid arguments passed in /in/fvWmX on line 6
Output for 4.3.11 - 5.2.4
Warning: preg_split(): Delimiter must not be alphanumeric or backslash in /in/fvWmX on line 4 Warning: array_pop(): The argument should be an array in /in/fvWmX on line 5 Warning: implode(): Bad arguments. in /in/fvWmX on line 6
Output for 4.3.2 - 4.3.10
Warning: Delimiter must not be alphanumeric or backslash in /in/fvWmX on line 4 Warning: array_pop(): The argument should be an array in /in/fvWmX on line 5 Warning: implode(): Bad arguments. in /in/fvWmX on line 6
Output for 4.3.0 - 4.3.1
Warning: Delimiter must not be alphanumeric or backslash in /in/fvWmX on line 4 Warning: array_pop() [http://www.php.net/function.array-pop]: The argument should be an array in /in/fvWmX on line 5 Warning: implode() [http://www.php.net/function.implode]: Bad arguments. in /in/fvWmX on line 6