summaryrefslogtreecommitdiff
path: root/Zend/tests/bug43332_2.phpt
blob: b8adef3b13e773fb466ff902a206d18cf2cdaec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
Bug #43332.2 (self and parent as type hint in namespace)
--FILE--
<?php
namespace foobar;

class foo {
  public function bar(\self $a) { }
}

$foo = new foo;
$foo->bar($foo); // Ok!
$foo->bar(new stdclass); // Error, ok!
--EXPECTF--
Fatal error: '\self' is an invalid class name in %sbug43332_2.php on line 5