ничего не отображается, когда класс находится в php-коде

У меня есть простая php-страница:

<?php include 'config.php'; include 'lib.php'; header("Content-type: text/html; charset=UTF-8"); ?> <html> <head> <title>view states</title> <link rel="stylesheet" type="text/css" href="css/style.css"/> <script type="text/javascript" src="jquery-1.8.2.min.js"></script> </head> <body> <div id="container"> WTF? </div> </body> </html> 

когда у меня есть код ниже в моем lib.php, мой dom просто содержит голову и тело. Заголовок ушел, контейнер div ушел, а текст «wtf?» также.

Что не так?

 class State { $id; $ip; $state; $date; $played; function __construct($id, $ip, $state, $date, $played) { $this->$id = $id; $this->$ip = $ip; $this->$state = $$state; $this->$date = $date; $this->$played = $played; } } 

Solutions Collecting From Web of "ничего не отображается, когда класс находится в php-коде"