3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $transport = array('foot', 'bike', 'car', 'plane'); foreach($transport as $tr) {var_dump(prev($tr));}
Output for 5.3.0 - 7.1.0
Warning: prev() expects parameter 1 to be array, string given in /in/pQh1T on line 4 NULL Warning: prev() expects parameter 1 to be array, string given in /in/pQh1T on line 4 NULL Warning: prev() expects parameter 1 to be array, string given in /in/pQh1T on line 4 NULL Warning: prev() expects parameter 1 to be array, string given in /in/pQh1T on line 4 NULL
Output for 4.3.2 - 5.2.17
Warning: prev(): Passed variable is not an array or object in /in/pQh1T on line 4 bool(false) Warning: prev(): Passed variable is not an array or object in /in/pQh1T on line 4 bool(false) Warning: prev(): Passed variable is not an array or object in /in/pQh1T on line 4 bool(false) Warning: prev(): Passed variable is not an array or object in /in/pQh1T on line 4 bool(false)
Output for 4.3.0 - 4.3.1
Warning: prev() [http://www.php.net/function.prev]: Passed variable is not an array or object in /in/pQh1T on line 4 bool(false) Warning: prev() [http://www.php.net/function.prev]: Passed variable is not an array or object in /in/pQh1T on line 4 bool(false) Warning: prev() [http://www.php.net/function.prev]: Passed variable is not an array or object in /in/pQh1T on line 4 bool(false) Warning: prev() [http://www.php.net/function.prev]: Passed variable is not an array or object in /in/pQh1T on line 4 bool(false)