Global Ray is a package that enables ray()
, dump()
, and dd()
from any PHP script:
π Global Ray has been released.https://t.co/t6XZgubgpR
It allows you to use “dd()β, “dump()β and “ray()β in any PHP file on your system.#laravel #php #package pic.twitter.com/0s9WFlavCz
β Freek Van der Herten π (@freekmurze) March 4, 2022
While developers in the Symfony and Laravel communities enjoy debugging functions like dump()
that provide a nice output for developers who want to debug values in PHP applications, not all PHP communities and environments in which you might develop have dump functions.
Using Global Ray, you can run useful debugging functions in any PHP script, thanks to a PHP INI setting auto_prepend_file
:
1composer global require spatie/global-ray
2Β
3# Install adds global ray file to `auto_prepend_file`
4# in your php.ini file
5global-ray install
After installation you can run ray(), dump()
, and dd()
from any PHP script on your system.
You can download and install this package for free on GitHub at spatie/global-ray. Also, check out Freek Van der Herten’s in-depth post on why this package was created and how it works.