summaryrefslogtreecommitdiff
path: root/Zend/tests/return_types/027.phpt
blob: 33a9c7f94dc861a999274178d5cee8e8a0085714 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--TEST--
Return type of parent is allowed in closure
--FILE--
<?php

class A {}
class B extends A {}

$c = function(parent $x): parent { return $x; };
var_dump($c->bindTo(null, 'B')(new A));
--EXPECTF--
object(A)#%d (0) {
}