Why not call the __call from the parent class?

There is such code:
class A {

 public function __call($method, $args) {
 echo " A => ".$method." ".implode(',', $args)."\n";
}

}

class B extends A {

 public function __call($method, $args) {
 echo " B => ".$method." ".implode(',', $args)."\n"; 
 } 

 public function me() {
parent::test(1,3);
 } 
}

$b = new B();
$b->me();


When executed, it turns out that call is called from the child class B, why?

B => test 1,3
August 23rd 19 at 10:44
2 answers
August 23rd 19 at 10:46
When executed, it turns out that call is called from the child class B, why?

Because you have overridden? How do you imagine the inheritance with overriding, if the ancestors have always caused only your methods? Each method call passes the entire chain of inheritance for a new one.
August 23rd 19 at 10:48
Then, they are magical techniques that worked magically.
Apparently magic has its own specific work/inheritance.
Why not found a "solution" found.

<?php
class A {

 public function __call($method, $args) {
 echo " A =--> ".$method." ".implode(',', $args)."\n";
}

}

class B extends A {

 public function __call($method, $args) {
 echo " B => ".$method." ".implode(',', $args)."\n"; 
 } 

 public function me() {
 parent::__call('test', [1,3]);
 } 
}

$b = new B();
$b->me();

Find more questions by tags PHP