3 ways to call a static method (class Foo, method bar)
1. $foo = new Foo; $foo::bar(); 2. $foo = 'Foo' $foo::bar(); 3. Foo::bar();
Rules about method override
method __construct can be declared in … (3)
Rules about constants declared in interface
Can not be overriden
Precedence order of trait and inheritance
class A{ function a(A) {}}
trait T { function a(T) {}}
class B extends A{ use T;}
class C extends A{ use T; function a() {C}}
C::a() -> C
B::a() -> T
A::a() -> AHow to access parent of class A which use trait T in T
In T, using “parent::” allows to access the parent of any class using the trait.
foreach of an object without the Iterable or the IteratorAgregate interface.
What happens?
Iterate through all public argument.
How to do a quick collection? (2)
How to do a quick collection? (2)
How need to be declared the __construct of a class inheriting from one declaring an abstract __construct?
For the first __construct in te hierarchy which is not abstract, the same as signature (same rules as method override). After, anyhow