3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $obj = new stdClass(); $obj->a = 1; $obj->b = 2; $obj->c = array('sub'=>1, 'hello'=>'world'); $arr = (array)$obj; print_r($arr);
Output for 4.3.0 - 7.1.0
Array ( [a] => 1 [b] => 2 [c] => Array ( [sub] => 1 [hello] => world ) )