3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Vendor {}; $vendor = new Vendor(); echo '$vendor = new Vendor();'; echo "\n"; echo 'isset($vendor->branch): '; var_dump(isset($vendor->branch)); echo "\n"; echo '!empty($vendor->branch): '; var_dump(!empty($vendor->branch)); echo "\n"; echo "\n"; $vendor->branch = "BRANCH"; echo '$vendor->branch = "BRANCH";'; echo "\n"; echo 'isset($vendor->branch): '; var_dump(isset($vendor->branch)); echo "\n"; echo '!empty($vendor->branch): '; var_dump(!empty($vendor->branch));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
$vendor = new Vendor(); isset($vendor->branch): bool(false) !empty($vendor->branch): bool(false) $vendor->branch = "BRANCH"; isset($vendor->branch): bool(true) !empty($vendor->branch): bool(true)