- var_dump: documentation ( source)
<?php
class ClassA
{
private static $someVariable = 99;
public static function setVariable($newValue)
{
self::$someVariable = $newValue;
}
public static function getVariable()
{
return self::$someVariable;
}
}
ClassA::setVariable(42);
echo "Static var is currently " . ClassA::getVariable() . "\n";
echo "Default val should be 99, found: ";
$reflectionClass = new ReflectionClass('ClassA');
var_dump($reflectionClass->getDefaultProperties());
echo "\n";