You can specify methods & properties as static that permits access to them from outside of the class.
<?php
class foo {
    static 
$bar 123;
    
    static function 
baz() {
        return 
456;
    }
}

echo 
foo::$bar// will print 123
echo foo::baz(); // will print 456
?>