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; print_r( $hire['hiring']);
Output for 5.3.1 - 7.1.0
Warning: explode() expects parameter 2 to be string, array given in /in/MgWWJ on line 11 Warning: array_map(): Argument #2 should be an array in /in/MgWWJ on line 11 10,5,8,1510,5,8,15
Output for 4.3.0 - 5.3.0
Notice: Array to string conversion in /in/MgWWJ on line 11 10,5,8,15Array10,5,8,15