- assert: documentation ( source)
- error_reporting: documentation ( source)
<?php
error_reporting(E_ALL | E_STRICT);
assert(error_reporting() & E_STRICT); // Make sure E_STRICT reporting is really turned on
class Foo
{
public function test($a, $b)
{
return $a + $b;
}
}
class Bar extends Foo
{
public function test()
{
return parent::test(1, 3);
}
}
$bar = new Bar();
assert($bar->test() === 4);