xref: /PHP-5.5/Zend/tests/bug39003.phpt (revision 2b1b2db8)
1--TEST--
2Bug #39003 (__autoload() is called for type hinting)
3--FILE--
4<?php
5
6class ClassName
7{
8	public $var = 'bla';
9}
10
11function test (OtherClassName $object) { }
12
13function __autoload($class)
14{
15    var_dump("__autload($class)");
16}
17
18$obj = new ClassName;
19test($obj);
20
21echo "Done\n";
22?>
23--EXPECTF--
24Catchable fatal error: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s on line %d
25