3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $hire = array( 'hiring' => array( (int) 1 => '10', (int) 2 => '5', (int) 3 => '8', (int) 4 => '15' ) ); $integerIDs = array_map('intval', explode(',', $hire['hiring'])); $hire['hiring'] = implode(',',$hire['hiring']); print_r($hire['hiring']); echo $integerIDs; echo "\n"; echo $hire['hiring'];
Output for 5.3.1 - 5.6.28, 7.0.0 - 7.1.0
Warning: explode() expects parameter 2 to be string, array given in /in/ALXki on line 11 Warning: array_map(): Argument #2 should be an array in /in/ALXki on line 11 10,5,8,15 10,5,8,15
Output for hhvm-3.10.0 - 3.12.0
Warning: explode() expects parameter 2 to be string, array given in /in/ALXki on line 11 Warning: array_map(): Argument #2 should be an array or collection 10,5,8,15 10,5,8,15
Output for 4.3.0 - 5.3.0
Notice: Array to string conversion in /in/ALXki on line 11 10,5,8,15Array 10,5,8,15