3v4l.org

run code in 200+ 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 - 7.2.0
$db->affected_rows int(1) empty($db->affected_rows) bool(false) $db->affected_rows > 0 bool(true)