Pasta: d2d8e95be2b4744f3029a151e50c62251676da7a (2015-09-17)

Język: PHP
Adres: p43.pl/p,d2d8e95be2b4744f3029a151e50c62251676da7a
Ilość linii: 30
Rozmiar: 0.58 kB
Wyświetleń: 368
Ostatnio użyto: 2017-11-18 04:45:06
<?php error_reporting(30711); ini_set('display_errors', 1); class First { protected static $instance; private $_second = null; private function __construct() { $this->_second = new Second(); } public static function getInstance() { if (empty(self::$instance)) self::$instance = new self(); return self::$instance; } } class Second { private $_first = null; public function __construct() { $this->_first = First::getInstance(); } } $null = new Second(); var_dump($null);