title = "The Great Gatsby"; $book->author = "F. Scott Fitzgerald"; $book->year = 1925; var_dump($book); ?>
object(stdClass)#1 (3) { ["title"]=> string(16) "The Great Gatsby" ["author"]=> string(18) "F. Scott Fitzgerald" ["year"]=> int(1925) }
name = "Tiger"; $animal->species = "Panthera tigris"; $animal->habitat = "Asia"; print_r($animal); ?>
stdClass Object ( [name] => Tiger [species] => Panthera tigris [habitat] => Asia )Both `var_dump()` and `print_r()` are part of the PHP core library, which means they are included automatically with any PHP installation.