- var_dump: documentation ( source)
<?php
class Foo {
protected $d = 0;
public function __construct() {
$this->d = 1;
}
public static function doSomething() {
return $this->d * 5;
}
}
$foo = new Foo();
var_dump($foo->doSomething());