phpist

Untitled

Oct 24th, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. Расшифруйте это как получилось class@anonymous Object ( [title] => Hello world! )
  2.  
  3.  
  4.  
  5. <?php ## Использование анонимных классов
  6. class Dumper
  7. {
  8. public static function print($obj)
  9. {
  10. print_r($obj);
  11. }
  12. }
  13. Dumper::print( new class {
  14. public $title;
  15. public function __construct(){
  16. $this->title = "Hello world!";
  17. }
  18. });
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment