3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var = '10, 24, 29, 32, 56'; $arr = array_map('intval', explode(', ', $var)); var_dump($arr);
based on BjGHN
Output for 4.3.0 - 7.2.0
array(5) { [0]=> int(10) [1]=> int(24) [2]=> int(29) [3]=> int(32) [4]=> int(56) }