{ } interface bar { } class barImpl implements bar { } class foobarImpl implements foo, bar { } class fooViaBarImpl extends barImpl implements foo { } class fooExtended extends fooImpl { } s_var_dump(class_implements(new foobarImpl())); s_var_dump(class_implements('foobarImpl')); s_var_dump(class_implements(new fooViaBarImpl())); s_var_dump(class_implements('fooViaBarImpl')); s_var_dump(class_implements(new fooExtended())); s_var_dump(class_implements('fooExtended')); function s_var_dump($arr) { krsort($arr); var_dump($arr); } ?> ===DONE===
{ use bar; } class foobarUser { use foo, bar; } /** There is no semantics for traits in the inheritance chain. Traits are flattend into a class, and that semantics is nothing like a type, or interface, and thus, not propergated. */ class fooViaBarUser extends barUser { use foo; } class fooExtended extends fooUser { } s_var_dump(class_uses(new foobarUser())); s_var_dump(class_uses('foobarUser')); s_var_dump(class_uses(new fooViaBarUser())); s_var_dump(class_uses('fooViaBarUser')); s_var_dump(class_uses(new fooExtended())); s_var_dump(class_uses('fooExtended')); function s_var_dump($arr) { krsort($arr); var_dump($arr); } ?> ===DONE===