Installing Ray for PHP

PHP is one of the world's most popular programming languages, powering millions of websites. Use Ray to help you debug any PHP project, from simple scripts to complex applications.

Using Laravel, WordPress, Yii, or another supported framework or CMS? Install the dedicated integration for extra framework-specific features.

#Global installation

To make the ray(), dump() and dd() functions available in any PHP file and project on your system, you can install the spatie/global-ray package.

composer global require spatie/global-ray
global-ray install

Note: If a PHP-specific framework package (e.g. Laravel, WordPress) is detected in your project, it will be used instead of the global Ray package.

spatie/global-ray

#Install in a single project

To use Ray in a single PHP project, install the ray package in the project.

composer require spatie/ray

spatie/ray

#What's next?

Now that Ray is running in your PHP, explore what else it can do!

Help us improve this page

Debug without breaking your flow

Ray keeps all your debug output neatly organized in a dedicated desktop app.

Licenses are valid for 1 year and managed through Spatie. Licenses purchased before Ray 3 remain valid. VAT is calculated at checkout.