horat1us / detect-caller
Util to detect caller of current method/function.
1.0.0
2020-07-03 11:03 UTC
Requires
- php: ^7.4 | ^8
Requires (Dev)
- phpunit/phpunit: ^9.2
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-10-29 06:05:49 UTC
README
Util to detect caller of current method/function.
Installation
Using composer:
composer require horat1us/detect-caller
*Requires PHP 7.4 to stimulate language version upgrade
Usage
<?php declare(strict_types=1); use Horat1us\DetectCaller; function ReturnOwnName(): string { return DetectCaller::function(); } echo ReturnOwnName(); // ReturnOwnName
See test case for more examples.