...runnin 5.0.4
<html>
<head></head>
<body>
echo hello
<?php
// PHP 5
// base class
class Bear {
public $name;
public $weight;
// constructor
public function __construct() {
}
// define methods
public function eat() {
}
public function run() {
}
public function sleep() {
}
}
?>
echo past 1st section
__________________________________________________________
it gets to here....
it hangs up in the derived class
or rather...just won't get to the next html echo
----------------------------------------------------------
<?php
// derived class
class GrizzlyBear extends Bear {
public function kill() {
}
}
?>
echo past derived class
//<?php
//$joe = new GrizzlyBear;
//$joe->name = "Joe Bear";
//$joe->weight = 1000;
//echo "Class: " . get_class($joe);
//echo "Parent class: " . get_parent_class(get_class($joe));
//?>
//<?php
// create instance
//$joe = new GrizzlyBear;
//$joe->name = "Joe Bear";
//$joe->weight = 1000;
// get class name
//$className = get_class($joe);
// get class properties
//echo "Class properties:\n";
//print_r(get_class_vars($className));
// get class methods
//echo "\nClass methods:\n";
//print_r(get_class_methods($className));
// get this instance's properties
//echo "\nInstance properties:\n";
//print_r(get_object_vars($joe));
//?>
</body>
</html>