3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $db = new stdClass; $db->affected_rows = 1; //affected_rows is type int echo '$db->affected_rows '; var_dump($db->affected_rows); echo 'empty($db->affected_rows) '; var_dump(empty($db->affected_rows)); echo '$db->affected_rows > 0 '; var_dump($db->affected_rows > 0);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
$db->affected_rows int(1) empty($db->affected_rows) bool(false) $db->affected_rows > 0 bool(true)