<?php
class A extends DOMDocument {
const TEST = false;
public function loadXml()
{
var_dump(static::TEST);
}
}
class B extends A {
const TEST = true;
}
$b = new B;
$b->loadXml();
Fatal error: Declaration of A::loadXml() must be compatible with DOMDocument::loadXML(string $source, int $options = 0): bool in /in/OlH17 on line 6
Process exited with code 255.
Fatal error: Declaration of A::loadXml() must be compatible with DOMDocument::loadXML(string $source, int $options = 0) in /in/OlH17 on line 6
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Warning: Declaration of A::loadXml() should be compatible with DOMDocument::loadXML($source, $options = NULL) in /in/OlH17 on line 6
bool(true)
Warning: Declaration of A::loadXml() should be compatible with DOMDocument::loadXML($source, $options = NULL) in /in/OlH17 on line 10
bool(true)
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Strict Standards: Declaration of A::loadXml() should be compatible with DOMDocument::loadXML($source, $options = NULL) in /in/OlH17 on line 10
bool(true)