xref: /PHP-7.1/Zend/tests/bug33116.phpt (revision 610c7fbe)
1--TEST--
2Bug #33116 (crash when assigning class name to global variable in __autoload)
3--FILE--
4<?php
5function __autoload($class)
6{
7  $GLOBALS['include'][] = $class;
8  eval("class DefClass{}");
9}
10
11$a = new DefClass;
12print_r($a);
13print_r($GLOBALS['include']);
14?>
15--EXPECT--
16DefClass Object
17(
18)
19Array
20(
21    [0] => DefClass
22)
23