<?php
class A
{
function showclass()
{
echo __CLASS__;
}
}
class B extends A
{
}
$a = new A();
$b = new B();
$a->showclass();
$b->showclass();
A::showclass();
B::showclass();
AA
Fatal error: Uncaught Error: Non-static method A::showclass() cannot be called statically in /in/RYC7M:19
Stack trace:
#0 {main}
thrown in /in/RYC7M on line 19
Process exited with code 255.
AA
Deprecated: Non-static method A::showclass() should not be called statically in /in/RYC7M on line 19
A
Deprecated: Non-static method A::showclass() should not be called statically in /in/RYC7M on line 20
A
AA
Strict Standards: Non-static method A::showclass() should not be called statically in /in/RYC7M on line 19
A
Strict Standards: Non-static method A::showclass() should not be called statically in /in/RYC7M on line 20
A