3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Stringable { function __toString() { return "A"; } } var_dump(new Stringable == "A"); var_dump(new Stringable === "A");
based on odZtr
Output for 5.2.0 - 7.2.0
bool(true) bool(false)
Output for 5.1.0 - 5.1.6
Notice: Object of class Stringable could not be converted to int in /in/BslXW on line 10 bool(false) bool(false)
Output for 4.3.0 - 5.0.5
bool(false) bool(false)