Turn FFP errors upto 11; report everything
[hiphop-php.git] / hphp / test / quick / mediawikitest.php
blob57b8567bd6dc132139e9559c44238ee8026c7bf6
1 <?hh
2 /**
3 * Test for PHP bug #50394 (PHP 5.3.x conversion to null only, not 5.2.x)
4 */
5 class PhpRefCallBugTester {
6 public $ok = false;
7 function __call( $name, $args ) {
8 $old = error_reporting( E_ALL & ~E_WARNING );
9 call_user_func_array( array( $this, 'checkForBrokenRef' ), $args );
10 error_reporting( $old );
12 function checkForBrokenRef( &$var ) {
13 if ( $var ) {
14 $this->ok = true;
17 function execute() {
18 $var = true;
19 call_user_func_array( array( $this, 'foo' ), array( &$var ) );
22 $test = new PhpRefCallBugTester();
23 $test->execute();
24 if (!$test->ok) {
25 echo "Test failed\n";
26 } else {
27 echo "Test passed\n";