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.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
string(9) "XMLReader" string(11) "myXMLReader"

preferences:
66.05 ms | 406 KiB | 5 Q