3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump((new ReflectionClass(XMLReader::class))->getProperties());
Output for 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.4, 8.3.6 - 8.3.13
array(14) { [0]=> object(ReflectionProperty)#2 (2) { ["name"]=> string(14) "attributeCount" ["class"]=> string(9) "XMLReader" } [1]=> object(ReflectionProperty)#3 (2) { ["name"]=> string(7) "baseURI" ["class"]=> string(9) "XMLReader" } [2]=> object(ReflectionProperty)#4 (2) { ["name"]=> string(5) "depth" ["class"]=> string(9) "XMLReader" } [3]=> object(ReflectionProperty)#5 (2) { ["name"]=> string(13) "hasAttributes" ["class"]=> string(9) "XMLReader" } [4]=> object(ReflectionProperty)#6 (2) { ["name"]=> string(8) "hasValue" ["class"]=> string(9) "XMLReader" } [5]=> object(ReflectionProperty)#7 (2) { ["name"]=> string(9) "isDefault" ["class"]=> string(9) "XMLReader" } [6]=> object(ReflectionProperty)#8 (2) { ["name"]=> string(14) "isEmptyElement" ["class"]=> string(9) "XMLReader" } [7]=> object(ReflectionProperty)#9 (2) { ["name"]=> string(9) "localName" ["class"]=> string(9) "XMLReader" } [8]=> object(ReflectionProperty)#10 (2) { ["name"]=> string(4) "name" ["class"]=> string(9) "XMLReader" } [9]=> object(ReflectionProperty)#11 (2) { ["name"]=> string(12) "namespaceURI" ["class"]=> string(9) "XMLReader" } [10]=> object(ReflectionProperty)#12 (2) { ["name"]=> string(8) "nodeType" ["class"]=> string(9) "XMLReader" } [11]=> object(ReflectionProperty)#13 (2) { ["name"]=> string(6) "prefix" ["class"]=> string(9) "XMLReader" } [12]=> object(ReflectionProperty)#14 (2) { ["name"]=> string(5) "value" ["class"]=> string(9) "XMLReader" } [13]=> object(ReflectionProperty)#15 (2) { ["name"]=> string(7) "xmlLang" ["class"]=> string(9) "XMLReader" } }
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 array(14) { [0]=> object(ReflectionProperty)#2 (2) { ["name"]=> string(14) "attributeCount" ["class"]=> string(9) "XMLReader" } [1]=> object(ReflectionProperty)#3 (2) { ["name"]=> string(7) "baseURI" ["class"]=> string(9) "XMLReader" } [2]=> object(ReflectionProperty)#4 (2) { ["name"]=> string(5) "depth" ["class"]=> string(9) "XMLReader" } [3]=> object(ReflectionProperty)#5 (2) { ["name"]=> string(13) "hasAttributes" ["class"]=> string(9) "XMLReader" } [4]=> object(ReflectionProperty)#6 (2) { ["name"]=> string(8) "hasValue" ["class"]=> string(9) "XMLReader" } [5]=> object(ReflectionProperty)#7 (2) { ["name"]=> string(9) "isDefault" ["class"]=> string(9) "XMLReader" } [6]=> object(ReflectionProperty)#8 (2) { ["name"]=> string(14) "isEmptyElement" ["class"]=> string(9) "XMLReader" } [7]=> object(ReflectionProperty)#9 (2) { ["name"]=> string(9) "localName" ["class"]=> string(9) "XMLReader" } [8]=> object(ReflectionProperty)#10 (2) { ["name"]=> string(4) "name" ["class"]=> string(9) "XMLReader" } [9]=> object(ReflectionProperty)#11 (2) { ["name"]=> string(12) "namespaceURI" ["class"]=> string(9) "XMLReader" } [10]=> object(ReflectionProperty)#12 (2) { ["name"]=> string(8) "nodeType" ["class"]=> string(9) "XMLReader" } [11]=> object(ReflectionProperty)#13 (2) { ["name"]=> string(6) "prefix" ["class"]=> string(9) "XMLReader" } [12]=> object(ReflectionProperty)#14 (2) { ["name"]=> string(5) "value" ["class"]=> string(9) "XMLReader" } [13]=> object(ReflectionProperty)#15 (2) { ["name"]=> string(7) "xmlLang" ["class"]=> string(9) "XMLReader" } }
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30
array(0) { }

preferences:
75.85 ms | 413 KiB | 5 Q