3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = '10, 24, 29, 32, 56'; $arr = array_map('intval', explode(', ', $var)); var_export($arr);
based on 1mbqS
Output for 4.3.0 - 7.1.0
array ( 0 => 10, 1 => 24, 2 => 29, 3 => 32, 4 => 56, )