3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $o = (object) array( 'foo' => bar ); var_dump( (int) $o );
Output for 7.2.0
Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future version of PHP) in /in/jXQYA on line 3 Notice: Object of class stdClass could not be converted to int in /in/jXQYA on line 4 int(1)
Output for 5.3.17 - 7.1.10
Notice: Use of undefined constant bar - assumed 'bar' in /in/jXQYA on line 3 Notice: Object of class stdClass could not be converted to int in /in/jXQYA on line 4 int(1)