K
K
kot-airplane2018-03-14 09:18:26
PHP
kot-airplane, 2018-03-14 09:18:26

Is it possible to get just the method name?

class DataController
{
    public function name()
    {
        $method = __METHOD__;
        echo "МЕТОД = $method<br>";

Displays Controller\DataController::nameand you just need name If you don’t clean it with a regular routine, can you get a ready-made method name right away?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Spiridonov, 2018-03-14
@kot-airplane

__FUNCTION__

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question