global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / tostring_throw.php
blob1499ffe641765e973cee5d4c083bfa7eb5dc4af2
1 <?php
3 class stringer {
4 public function __toString() { throw new Exception("nope\n"); }
6 class dtor {}
8 function ignore() {}
9 function foo() {
10 $x = new stringer();
11 ignore(new dtor(), "foo" . $x);
14 try {
15 foo();
16 } catch (Exception $e) {
19 print "all ok\n";