Description
The following code:
<?php
interface Iface {}
trait Tr {}
class ParentC implements Iface {}
class ChildC extends ParentC {
use Tr;
}
var_dump(class_parents('\ChildC', false));
var_dump(class_parents('\ChildC'));
var_dump(class_implements('\ParentC', false));
var_dump(class_uses('\ChildC', false));
Resulted in this output:
Warning: class_parents(): Class \ChildC does not exist in /in/T5JUQ on line 11
bool(false)
array(1) {
["ParentC"]=>
string(7) "ParentC"
}
Warning: class_implements(): Class \ParentC does not exist in /in/T5JUQ on line 13
bool(false)
Warning: class_uses(): Class \ChildC does not exist in /in/T5JUQ on line 14
bool(false)
But I expected this output instead:
array(1) {
["ParentC"]=>
string(7) "ParentC"
}
array(1) {
["ParentC"]=>
string(7) "ParentC"
}
array(1) {
["Iface"]=>
string(5) "Iface"
}
array(1) {
["Tr"]=>
string(2) "Tr"
}
PHP Version
Operating System
No response
Description
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
Operating System
No response