Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* index.php */
- class main_class
- {
- private $test2;
- var $test = "Hello<br />";
- public function __construct()
- {
- echo "Construct of 'main_class' called!<br />";
- $this->test2 = array();
- include("./test1.php");
- $this->test = new test1();
- }
- protected function do_include()
- {
- echo "Function 'do_include' called!<br />";
- include("./test2.php");
- $this->test2["test2"] = new test2();
- }
- }
- $test = new main_class();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement