<?php
class MyClass
{
function __invokeStatic()
{
echo "Dear God, why would you do this\n";
}
}
function MyClass()
{
MyClass::__invokeStatic();
}
MyClass();
Fatal error: Uncaught Error: Non-static method MyClass::__invokeStatic() cannot be called statically in /in/fnLcU:13
Stack trace:
#0 /in/fnLcU(16): MyClass()
#1 {main}
thrown in /in/fnLcU on line 13
Process exited with code 255.