3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public $esam = 10; } class B { public $mase = 20; } $a = new A; $a->esam = new B; echo $a->esam;
based on 5hVBJ
Output for 7.1.0 - 7.3.0alpha1
Recoverable fatal error: Object of class B could not be converted to string in /in/mSq1g on line 16
Process exited with code 255.
Output for 5.6.30, 7.0.30
Catchable fatal error: Object of class B could not be converted to string in /in/mSq1g on line 16
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Object of class B could not be converted to string in /in/mSq1g:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: Object of class B could not be converted to string in /in/mSq1g:16 Stack trace: #0 {main}
Process exited with code 255.