3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myXMLReader extends XMLReader { } $r1 = myXMLReader::XML('foo'); var_dump(get_debug_type($r1)); $r2 = new myXMLReader; $r2->XML('foo'); var_dump(get_debug_type($r2));
Output for 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.14
string(9) "XMLReader" string(11) "myXMLReader"

preferences:
44.46 ms | 406 KiB | 5 Q