3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hire = array( 'hiring' => array( (int) 1 => '10', (int) 2 => '5', (int) 3 => '8', (int) 4 => '15' ) ); $a=[]; foreach($hire['hiring'] as $key=>$value) { $a[$key] = (int)$value; } print_r($a);

preferences:
44.94 ms | 402 KiB | 5 Q