3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class T{ public $a = 1; public $b = null; } $t = new T; var_dump(isset($t->a)); var_dump(isset($t->b)); var_dump(property_exists($t, a)); var_dump(property_exists($t, b));
based on mA59q
Output for 7.2.0 - 7.3.1
bool(true) bool(false) Warning: Use of undefined constant a - assumed 'a' (this will throw an Error in a future version of PHP) in /in/On79B on line 10 bool(true) Warning: Use of undefined constant b - assumed 'b' (this will throw an Error in a future version of PHP) in /in/On79B on line 11 bool(true)
Output for 5.6.0 - 5.6.38, hhvm-3.15.4, 7.0.0 - 7.1.25
bool(true) bool(false) Notice: Use of undefined constant a - assumed 'a' in /in/On79B on line 10 bool(true) Notice: Use of undefined constant b - assumed 'b' in /in/On79B on line 11 bool(true)