Echo89

index.php

Sep 30th, 2013
52
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. class test
  4. {
  5.     function __construct()
  6.     {
  7.         include("./test.php");
  8.         $class_var_name = "some_var_name";
  9.         $class_name = "extension";
  10.         $this->$class_var_name = new $class_name();
  11.     }
  12. }
  13.  
  14. $class = new test();
  15. $var_name = "hi";
  16. $class->some_var_name->$var_name = "Hello, World!";
  17.  
  18. echo $class->some_var_name->hi;
  19.  
  20. ?>
RAW Paste Data