3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Example { public $var = 123; } $e = new Example(); $e->var = 456; var_dump(get_class_vars("Example")); /* array(1) { ["var"]=> int(123) } */ var_dump(get_object_vars($e)); /* array(1) { ["var"]=> int(456) } */
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.1.0 - 7.3.0beta1
array(1) { ["var"]=> int(123) } array(1) { ["var"]=> int(456) }