PHP 8.5.0 Alpha 4 available for testing

Voting

: min(six, two)?
(Example: nine)

The Note You're Voting On

JustAddingSomeAdditionalUseCase
2 years ago
I have not seen this specific use case:

"Wanting to preserve action of parent class method, the trait one calling ::parent & also the child class mehod action".

// Child class.
use SuperTrait {
initialize as initializeOr;
}
public function initialize(array &$element) {
...
$this->initializeOr($element);
}
// Trait.
public function initialize(array &$element) {
...
parent::initialize($element);
}
// Parent class.
public function initialize(array &$element) {
...
}

<< Back to user notes page

To Top