Get your own PHP server Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<?php
function get_cars($obj) {
  if (!is_object($obj)) {
    return false;
}
return $obj->cars;
}
$obj = new stdClass();
$obj->cars = array("Volvo", "BMW", "Audi");
var_dump(get_cars(null));
echo "<br>";
var_dump(get_cars($obj));
?>
</body>
</html>
bool(false)
array(3) { [0]=> string(5) "Volvo" [1]=> string(3) "BMW" [2]=> string(4) "Audi" }