<?php
class foo {
static $bar = 123;
static function baz() {
return 456;
}
}
echo foo::$bar; // will print 123
echo foo::baz(); // will print 456
?>
Incompatible:
- In PHP 5 $this will never be available when a method is defined as static, not even the $this from the scope where a static method was called from.