All pastes #896031 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-02-08 08:12 UTC
rendered paste body
<?php

Class A {
	private $id;
	
	function __construct ($id) {
		$this->id = $id;
	}
	
	function __destruct () {
		echo __CLASS__ . $this->id . getcwd() . '  --  ';
	}
}

Class B {
	function __construct () {
		$local = new A(':local:');
		$GLOBALS['A'] = new A(':GLOBAL:');
	}
}

new B();

?>