<?php
abstractclass Number {
private $value;
abstractpublic function value();
public function reset() {
$this->value = NULL;
}
}
classIntegerextends Number {
private $value;
public function value() {
return (int)$this->value;
}
}
$num = newInteger; /* Okay */
$num2 = new Number; /* This will fail */
?>