<?php
class A extends DOMDocument {
const TEST = false;
public function loadXml($source, $options = NULL)
{
var_dump(static::TEST);
}
}
class B extends A {
const TEST = true;
}
$b = new B;
$b->loadXml('test');
Deprecated: Return type of A::loadXml($source, $options = null) should either be compatible with DOMDocument::loadXML(string $source, int $options = 0): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/ks6EK on line 6
bool(true)