Guest User

Untitled

a guest
Apr 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. class TestClass
  5. {
  6. public $foo;
  7. public $language;
  8.  
  9. //tar man bort // funkar det ej :S
  10. //$this->language = $_SESSION['language'];
  11.  
  12.  
  13. public function __construct($foo) {
  14. $this->language = $foo;
  15. $this->disp($this->language);
  16. }
  17.  
  18. public function disp($what){
  19. echo $what.' '.$this->language;
  20. }
  21.  
  22. }
  23.  
  24. $class = new TestClass($_SESSION['language']);
  25.  
  26. ?>
Add Comment
Please, Sign In to add comment