/hphp/test/slow/ir_inlining/unset.php
http://github.com/facebook/hiphop-php · PHP · 39 lines · 32 code · 5 blank · 2 comment · 0 complexity · a093f5c3b17e94122613c0c45b433240 MD5 · raw file
- <?hh
- class NonExistProp {
- private $x;
- public function __construct() {
- $x = "str";
- }
- public function unsetIt() {
- unset($this->x);
- }
- public function getX() {
- return $this->x;
- }
- }
- // TODO: this will need a hopt to enable throw
- function thrower() {
- //var_dump(debug_backtrace());
- throw new Exception("Yo");
- }
- function test7() {
- set_error_handler(fun('thrower'));
- try {
- $obj = new NonExistProp();
- $obj->unsetIt();
- $k = new Dtor();
- echo $obj->getX();
- echo "\n";
- }
- catch (Exception $x) {
- }
- }
- <<__EntryPoint>>
- function main_unset() {
- test7();
- }