<?php
interface A {
const D = 12;
public static function test(array $a);
}
class B implements A {
public static function test(array $a){
return parent::D;
}
}
var_dump(B::test(array()));
Fatal error: Cannot use "parent" when current class scope has no parent in /in/copMM on line 9
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Deprecated: Cannot use "parent" when current class scope has no parent in /in/copMM on line 9
Fatal error: Uncaught Error: Cannot access parent:: when current class scope has no parent in /in/copMM:9
Stack trace:
#0 /in/copMM(13): B::test(Array)
#1 {main}
thrown in /in/copMM on line 9
Process exited with code 255.
Fatal error: Uncaught Error: Cannot access parent:: when current class scope has no parent in /in/copMM:9
Stack trace:
#0 /in/copMM(13): B::test(Array)
#1 {main}
thrown in /in/copMM on line 9
Process exited with code 255.