Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- spl_autoload_register(function($class_name){
- include $class_name .'.php';
- });
- $obj = new Manusia();
- echo $obj->nama = 'Sri';
- echo $obj->bersuara();
- echo "<br>";
- $obj2 = new HewanPeliharaan('Bebekku','Herbivora','Rumput');
- $obj2->bersuara();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement