<?php
interface I {
const D = 12;
public static function test(array $a);
}
abstract class A {
const C = 14;
}
class B implements I {
const C = 15;
public static function test(array $a){
return parent::C;
}
}
var_dump(B::test(array()), A::C, B::C);
Fatal error: Cannot use "parent" when current class scope has no parent in /in/G1mhm on line 14
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/G1mhm on line 14
Fatal error: Uncaught Error: Cannot access parent:: when current class scope has no parent in /in/G1mhm:14
Stack trace:
#0 /in/G1mhm(18): B::test(Array)
#1 {main}
thrown in /in/G1mhm on line 14
Process exited with code 255.
Fatal error: Uncaught Error: Cannot access parent:: when current class scope has no parent in /in/G1mhm:14
Stack trace:
#0 /in/G1mhm(18): B::test(Array)
#1 {main}
thrown in /in/G1mhm on line 14
Process exited with code 255.