xref: /PHP-7.2/Zend/tests/anon/011.phpt (revision 2141ab9b)
1--TEST--
2Ensure proper inheritance with get_class(anon class instance) used via class_alias (see also bug #70106)
3--FILE--
4<?php
5
6class_alias(get_class(new class { protected $foo = 1; }), "AnonBase");
7var_dump((new class extends AnonBase {
8	function getFoo() {
9		return $this->foo;
10	}
11})->getFoo());
12?>
13--EXPECT--
14int(1)
15