How do I access the static variables of a derived class in a base class method?

class B {
public static $s = "baked;
public function m () {
echo self::$s; / /" B"
/ / $this actually points to the instance of D, how can I access the DVDs?
}
}

class D extends B {
public static $s = "Downs;
}

$d = new D ();
$d-> m ();

of course I know that Class D can redefine function m, but I wonder if there is a way not to redefine it. Thank you!

Php
Jul.06,2021

make good use of code format

<?php

class B
{
    static $s = 'B';
    
    public function m() {
        echo static::$s;
    }
}

class D extends B
{
    static $s = 'D';
}
// output: D
(new D)->m();
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31324-2bd59.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31324-2bd59.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?