3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump((new ReflectionClass(Exception::class))->getDefaultProperties()); var_dump(get_class_vars(Exception::class));
Output for 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
array(7) { ["message"]=> string(0) "" ["string"]=> string(0) "" ["code"]=> int(0) ["file"]=> string(0) "" ["line"]=> int(0) ["trace"]=> array(0) { } ["previous"]=> NULL } array(0) { }
Output for 8.0.0 - 8.0.30
array(7) { ["message"]=> string(0) "" ["string"]=> string(0) "" ["code"]=> int(0) ["file"]=> NULL ["line"]=> NULL ["trace"]=> array(0) { } ["previous"]=> NULL } array(0) { }
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
array(7) { ["message"]=> string(0) "" ["string"]=> string(0) "" ["code"]=> int(0) ["file"]=> NULL ["line"]=> NULL ["trace"]=> NULL ["previous"]=> NULL } array(0) { }

preferences:
99.25 ms | 1993 KiB | 4 Q