Voting

: eight minus five?
(Example: nine)

The Note You're Voting On

Rich
2 years ago
<?php

namespace My\App {
class
Api {
public static
fetch() {
print
__FUNCTION__ . "\n"; // outputs fetch
print __METHOD__ . "\n"; // outputs My\App\Api::fetch
}
}

Api::fetch();
}

namespace {
My\App\Api::fetch();
}
?>

__METHOD__ outputs a fully qualified method name; __FUNCTION__ when used in a method, outputs just the method name.

<< Back to user notes page

To Top