<?php
    $murid = new \stdClass;
    $murid->nama = "Adi";
    $murid->usia = 27;
    $murid->hobi = array("membaca", "olahraga");

    echo "$murid->nama berusia $murid->usia tahun <br/>";

    echo "Hobinya : ";
    echo $murid->hobi[0];
    echo " dan ";
    echo $murid->hobi[1];

?>