3v4l.org

run code in 500+ PHP versions simultaneously
<?php class a {} $a = new a; $b = '\\a'; var_dump($a instanceof $b); var_dump($a instanceof \a); // C is not a constant, but a class name (see use) const object = '\\a'; var_dump($a instanceof object); use a as c; var_dump($a instanceof c); // compile error : unexpected T_CLASS // var_dump($a instanceof a::class); // compile error : unexpected T_CONSTANT_ENCAPS_STRING // var_dump($a instanceof 'a');
Output for git.master, git.master_jit
bool(true) bool(true) bool(false) bool(true)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

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


preferences:
46.1 ms | 864 KiB | 4 Q