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 - 7.1.0
1int(1) empty(1)bool(false) 1 > 0bool(true)