<?php class Test { public function __construct() { $this->fp = fopen(__FILE__, 'r'); } public function __destruct() { fclose($this->fp); } public function __clone() { $this->fp = fopen(__FILE__, 'r'); } public function getFp() { return $this->fp; } } $t = new Test; var_dump($t->getFp()); // works $c = clone $t; var_dump($c->getFp()); // works var_dump((clone $t)->getFp()); // dtor'd before being accessed?
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`