- Output for 5.3.0 - 5.3.26, 5.4.0 - 5.4.16
- Fatal error: Cannot redeclare Test::test() in /in/nf5r7 on line 7
Process exited with code 255.
<?php
class Test {
public static function test($str="Static", $txt="") {
return "$str version: $txt";
}
public function test($txt="") {
return self::test("Non static: $txt");
}
}
echo Test::test();
$test=new Test();
echo $test->test("prova");