Answer the question
In order to leave comments, you need to log in
Why notice swears?
Good day!
I will try to correctly paint my thoughts, thanks to those who have the patience to read.
There is an abstract class A.
There is a singleton B that inherits A
there is a class C that inherits A
Everything would be fine, but A has a recursive method and a $array variable that re-calls itself. if it does not find the desired number
if $i is more than two, then we start looking for $i in class C, before that we are looking in class B,
I hope I didn’t confuse
abstract class A
{
$arr = array();
public static function test($array, $i)
{
if(empty($array->arr[$i]))
{
$i++;
self::test($array->arr[$i], $i)
}
}
}
Notice: Accessing static property C::$arr as non static
($array->arr[$i], $i)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question