Voting

: min(five, nine)?
(Example: nine)

The Note You're Voting On

Anonymous
3 years ago
class P_Class {
public static $val = "Parent";
public static function setVal($val){
static::$val = $val;
}
public static function getVal(){
return static::$val;
}
}

class C_Class extends P_Class{}

C_Class::setVal("Child");
var_dump(C_Class::getVal());
var_dump(P_Class::getVal());

Output:
string(5) "Child"
string(5) "Child"

<< Back to user notes page

To Top