Why is this legal in PHP?
<?php
class Foo {
public function test() {
echo "hello
";
}
}
Foo::test();
?>
test() is a non-static function but I can access it without an instance.
See Question&Answers more detail:osWhy is this legal in PHP?
<?php
class Foo {
public function test() {
echo "hello
";
}
}
Foo::test();
?>
test() is a non-static function but I can access it without an instance.
See Question&Answers more detail:os