3v4l.org

run code in 300+ PHP versions simultaneously
<?php $o=new C1(); $o->f();/*this is OK, because C1 does not implement anything, it can be declared anywhere.*/ $o=new C2();/*this is NOT ok, because C2 implements something, it must be declared before being used.*/ class C1 /*implements nothing*/ { function f() { echo "Hellooo"; } } class C2 implements Countable{ function count(){} }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
152.69 ms | 2095 KiB | 11 Q