mirror of
https://github.com/php/php-src.git
synced 2024-09-28 21:36:12 +00:00
22 lines
255 B
Plaintext
22 lines
255 B
Plaintext
|
--TEST--
|
||
|
Bug #70958 (Invalid opcode while using ::class as trait method paramater default value)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
trait Foo
|
||
|
{
|
||
|
function bar($a = self::class) {
|
||
|
var_dump($a);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class B {
|
||
|
use Foo;
|
||
|
}
|
||
|
|
||
|
$b = new B;
|
||
|
|
||
|
$b->bar();
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
string(1) "B"
|