- time: documentation ( source)
- sleep: documentation ( source)
<?php
class time{
public static $x;
public function echoTime() {
$this->x = time();
echo $this->x;
}
}
class A {
public static function test() {
$time = new time();
$time->echoTime();
}
}
A::test();
sleep(2);
A::test();