- Output for 5.3.0 - 5.3.17, 5.4.0 - 5.4.7
- Fatal error: Cannot redeclare foo::ted() in TOes7 on line 20
Process exited with code 255.
<?php
class foo {
function __call($name, $args){
echo "__call " . $name . PHP_EOL;
}
public static function __callStatic($name, $args) {
echo "__callStatic " . $name . PHP_EOL;
}
function make_call() {
$this->bob();
}
function ted() {
echo ":: doesn't always mean static" . PHP_EOL;
}
public static function ted() {
echo "I know I should be static". PHP_EOL;
}
function make_call_static() {
$this::ted();
}
}
$x = new foo();
$x->jim();
$x->make_call();
$x->make_call_static();
foo::sam();