<?php class A {} class B {} class Overloaded { protected $value; function setValue(A $x) { print __METHOD__ . '(A)' . PHP_EOL; $this->value = $x; } function setVаlue(B $x) { print __METHOD__ . '(B)' . PHP_EOL; $this->value = $x; } } $something = new Overloaded(); $something->setValue(new A); var_dump($something); $something->setVаlue(new B); var_dump($something);
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`