Echo89

index.php

Sep 30th, 2013
61
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /* index.php */
  3. class main_class
  4. {
  5.     private $test2;
  6.     var $test = "Hello<br />";
  7.     public function __construct()
  8.     {
  9.         echo "Construct of 'main_class' called!<br />";
  10.         $this->test2 = array();
  11.         include("./test1.php");
  12.         $this->test = new test1();
  13.     }
  14.    
  15.     protected function do_include()
  16.     {
  17.         echo "Function 'do_include' called!<br />";
  18.         include("./test2.php");
  19.         $this->test2["test2"] = new test2();
  20.     }
  21. }
  22.  
  23. $test = new main_class();
  24.  
  25. ?>
RAW Paste Data