abstract class Fruit {
private $color;
abstract public function eat();
public function setColor($c) {
$this->color = $c;
}
}
class Apple extends Fruit {
public function eat() {
echo "Omnomnom";
}
}
$obj = new Apple();
$obj->eat();In this example an interface would not be able to have method with definition, only method signatures are allowed in interfacesinterface IMusician {
public function play();
}
class Guitarist implements IMusician {
public function play() {
echo "playin a guitar";
}
}In this example Guitarist child class has to define play() method because the child class implements interface IMusician that has the method signatureInterface IBar {
public function method3();
}
Interface IArray {
public function method2();
}
Interface IFoo extends IBar, IArray {
public function method1();
}
class class1 implements IFoo {
public function method1() {
}
public function method2() {
}
// public function method3() {
// }
}Class class1 implements IFoo interface which extends other two interfaces itself.
Because the class has not implemented method3 method (commented), then the following error will be generated:Fatal error: Class class1 contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (IBar::method3)preconnect or dns-prefetch resource hints to establish early connections to important third-party origins.
For example to pre-connect google analytics: https://www.google-analytics.com we should include rel attribute with preconnect value:<link rel="preconnect" href="https://www.google-analytics.com" crossorigin> in head tagCSS /* Fix to pass Lighthouse: */
.label-hidden {
position: absolute;
height: 1px;
width: 1px;
clip: rect(1px,1px,1px,1px);
border: 0;
overflow: hidden
}Another solution to the problem:/* Fix to pass Lighthouse: */
label-hidden {
position: absolute;
top:-1000px;
left:-1000px;
}aria-label="Twitter" attribute on a tag<a href="<?=$hostname?>" aria-label="Sibrdzne" class="bg-logo"></a>lighthouse)
Advice: Add rel="noopener" or rel="noreferrer" to any external links to improve performance and prevent security vulnerabilities<a class="a_" rel="noreferrer" href="http://orthodoxy.ge" target="_blank" title="მართლმადიდებლური საიტი orthodoxy.ge">orthodoxy.ge</a>Links that the noreferrer was used:
orthodoxy.ge
teodore.ge
qadageba.geprint_r(json_encode(getallheaders()));
The result of the above code is:{
"Content-Type": "application/json",
"User-Agent": "PostmanRuntime/7.26.8",
"Accept": "*/*",
"Postman-Token": "a89b677d-776a-45d7-988c-f18ad2512522",
"Host": "localhost",
"Accept-Encoding": "gzip, deflate, br",
"Connection": "keep-alive",
"Content-Length": "137"
}