3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class a { protected $v; function __toString() { return $this->v; } } class b { protected $v; function __toString() { return $this->v; } } $a = new a(); $b = new b(); echo $a . $b;
Output for 7.1.0 - 7.2.0
Recoverable fatal error: Method a::__toString() must return a string value in /in/aECjk on line 28
Process exited with code 255.
Output for 5.3.18 - 7.0.20
Catchable fatal error: Method a::__toString() must return a string value in /in/aECjk on line 28
Process exited with code 255.