3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { const B = 'A::B is a constant'.PHP_EOL; } class C { const B = 'C::B is a constant'.PHP_EOL; } const C = new A; echo C::B; // C is the class echo (C)::B; // C is the constant // C is a class here var_dump(new C instanceof C); // (C) is the constant, var_dump(new C instanceof (C)); // instanceof works with objects too var_dump(new C instanceof (new C)); // but this is invalid syntax //var_dump(new C instanceof new C); ?>

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
157.04 ms | 1466 KiB | 9 Q