3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = 'CORN FUTURE May14'; $data = preg_split('\s', $subject); array_pop($data); $name = trim(implode(' ', $data)); echo $name;
Output for 5.5.0 - 5.6.21, 7.0.0 - 7.1.0
Notice: Undefined variable: subject in /in/CmlET on line 4 Warning: preg_split(): Delimiter must not be alphanumeric or backslash in /in/CmlET on line 4 Warning: array_pop() expects parameter 1 to be array, boolean given in /in/CmlET on line 5 Warning: implode(): Invalid arguments passed in /in/CmlET on line 6
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: subject in /in/CmlET on line 4 Warning: Delimiter must not be alphanumeric or backslash in /in/CmlET on line 4 Warning: array_pop() expects parameter 1 to be an array or mutable collection in /in/CmlET on line 5 Warning: Invalid operand type was used: implode() expects a container as one of the arguments in /in/CmlET on line 6
Output for 5.3.0 - 5.4.45
Warning: preg_split(): Delimiter must not be alphanumeric or backslash in /in/CmlET on line 4 Warning: array_pop() expects parameter 1 to be array, boolean given in /in/CmlET on line 5 Warning: implode(): Invalid arguments passed in /in/CmlET on line 6
Output for 5.2.5 - 5.2.17
Warning: preg_split(): Delimiter must not be alphanumeric or backslash in /in/CmlET on line 4 Warning: array_pop(): The argument should be an array in /in/CmlET on line 5 Warning: implode(): Invalid arguments passed in /in/CmlET on line 6
Output for 5.2.3 - 5.2.4
Warning: preg_split(): Delimiter must not be alphanumeric or backslash in /in/CmlET on line 4 Warning: array_pop(): The argument should be an array in /in/CmlET on line 5 Warning: implode(): Bad arguments. in /in/CmlET on line 6
Output for 4.4.3 - 5.2.2
<br /> <b>Warning</b>: preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Delimiter must not be alphanumeric or backslash in <b>/in/CmlET</b> on line <b>4</b><br /> <br /> <b>Warning</b>: array_pop() [<a href='function.array-pop'>function.array-pop</a>]: The argument should be an array in <b>/in/CmlET</b> on line <b>5</b><br /> <br /> <b>Warning</b>: implode() [<a href='function.implode'>function.implode</a>]: Bad arguments. in <b>/in/CmlET</b> on line <b>6</b><br />
Output for 4.3.11 - 4.4.2
<br /> <b>Warning</b>: preg_split(): Delimiter must not be alphanumeric or backslash in <b>/in/CmlET</b> on line <b>4</b><br /> <br /> <b>Warning</b>: array_pop(): The argument should be an array in <b>/in/CmlET</b> on line <b>5</b><br /> <br /> <b>Warning</b>: implode(): Bad arguments. in <b>/in/CmlET</b> on line <b>6</b><br />
Output for 4.3.2 - 4.3.10
<br /> <b>Warning</b>: Delimiter must not be alphanumeric or backslash in <b>/in/CmlET</b> on line <b>4</b><br /> <br /> <b>Warning</b>: array_pop(): The argument should be an array in <b>/in/CmlET</b> on line <b>5</b><br /> <br /> <b>Warning</b>: implode(): Bad arguments. in <b>/in/CmlET</b> on line <b>6</b><br />
Output for 4.3.0 - 4.3.1
<br /> <b>Warning</b>: Delimiter must not be alphanumeric or backslash in <b>/in/CmlET</b> on line <b>4</b><br /> <br /> <b>Warning</b>: array_pop() [<a href='http://www.php.net/function.array-pop'>function.array-pop</a>]: The argument should be an array in <b>/in/CmlET</b> on line <b>5</b><br /> <br /> <b>Warning</b>: implode() [<a href='http://www.php.net/function.implode'>function.implode</a>]: Bad arguments. in <b>/in/CmlET</b> on line <b>6</b><br />