Skip to content

Commit 92cc345

Browse files
committed
Add test for bug 76451
1 parent 00d1716 commit 92cc345

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Zend/tests/bug76451.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
3+
class Foo {}
4+
class_alias('Foo', 'Bar');

Zend/tests/bug76451.phpt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Aliases during inheritance type checks affected by opcache
3+
--INI--
4+
opcache.enable=1
5+
opcache.enable_cli=1
6+
opcache.optimization_level=-1
7+
--SKIPIF--
8+
<?php if (!extension_loaded('Zend OPcache') || php_sapi_name() != "cli") die("skip CLI only"); ?>
9+
--FILE--
10+
<?php
11+
require __DIR__ . "/bug76451.inc";
12+
13+
class A {
14+
public function test(Foo $foo) {}
15+
}
16+
class B extends A {
17+
public function test(Bar $foo) {}
18+
}
19+
?>
20+
--EXPECT--

0 commit comments

Comments
 (0)