- time: documentation ( source)
<?php
class Backup_Config {
public $a = '';
function __construct() {
$this->a = time();
}
}
class Backup extends Backup_Config {
public $b = 'test';
function __construct() {
parent::__construct();
echo __CLASS__ . ':' . $this->a . '<BR>';
}
public function foo () {
$helper = new Backup_Helper();
echo __FUNCTION__ . ':' . $this->a . '<BR>';
$helper->bar();
}
}
class Backup_Helper extends Backup {
public function bar() {
echo __FUNCTION__ . ':' . $this->a . ' and ' . $this->b . '<BR>';
}
}
$init = new Backup();
$init->foo();