3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump((array)null); var_dump((array)0); var_dump((array)1); var_dump((array)'hey'); var_dump((array)array('great', 'guys'));
Output for 4.3.0 - 7.1.0
array(0) { } array(1) { [0]=> int(0) } array(1) { [0]=> int(1) } array(1) { [0]=> string(3) "hey" } array(2) { [0]=> string(5) "great" [1]=> string(4) "guys" }