3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(method_exists(new StdClass, '__toString')); var_dump(method_exists("waa", '__toString')); var_dump(method_exists(array(), '__toString')); var_dump(method_exists(1.337, '__toString')); class A { public function __call($a, $args) { echo $a; } } $a = new A; echo $a->__toString();

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
bool(false) bool(false) bool(false) bool(false) __toString
Output for Array change keys
bool(false) bool(false) bool(false) bool(false) __toString
Output for Lexical anon
bool(false) bool(false) bool(false) bool(false) __toString

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page