3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace SomeNamespace; interface SomeClassInterface { public function isSame(self $class); } class SomeClass implements SomeClassInterface { public function isSame(SomeClassInterface $class) { return $this === $class; } } $foo = new SomeClass(); var_dump($foo->isSame($foo));
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.1.0 - 7.3.0beta1
bool(true)