<?php
echo "<p>file test1.php was loaded</p>";
class test {
private $obj;
function test() {
$this->obj= new test1();
echo "<p>new object of class 'test' from file 'test1.php' created</p>";
}
public function sh() {
$this->obj->show();
}
}
class test1 {
private $text;
function test1(){
$this->text= "<p>new object of class 'test1' from file 'test1.php' created</p>";
}
public function show() {
echo $this->text;
}
}
?>
|