global statement removal: hphp/test/zend [2/x]
[hiphop-php.git] / hphp / test / zend / good / Zend / tests / bug31102.php
bloba9be3a04e1e00e7e1b52b4b5b1af50c1c6a7f898
1 <?php
3 abstract final class ZendGoodZendTestsBug31102 {
4 public static $test = 0;
7 function __autoload($class)
11 echo __METHOD__ . "($class,".ZendGoodZendTestsBug31102::$test.")\n";
12 switch(ZendGoodZendTestsBug31102::$test)
14 case 1:
15 eval("class $class { function __construct(){throw new Exception('$class::__construct');}}");
16 return;
17 case 2:
18 eval("class $class { function __construct(){throw new Exception('$class::__construct');}}");
19 throw new Exception(__METHOD__);
20 return;
21 case 3:
22 return;
26 while(ZendGoodZendTestsBug31102::$test++ < 5)
28 try
30 eval("\$bug = new Test".ZendGoodZendTestsBug31102::$test."();");
32 catch (Exception $e)
34 echo "Caught: " . $e->getMessage() . "\n";
38 ===DONE===
39 <?php exit(0); ?>