# Installing Ray for PHP

[PHP](https://www.php.net/) 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](/content/docs/getting-started/integrations/index.html) 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](https://github.com/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](https://github.com/spatie/ray)

> ## What's next?
> Now that Ray is running in your PHP, explore what else it can do!
> - [Learn how to use Ray with PHP](/content/docs/php/vanilla-php/usage/index.html)
> - [View all available methods](/content/docs/php/vanilla-php/reference/index.html)
> - [Add a config file to your project](/content/docs/php/vanilla-php/configuration/index.html)

## Debug without breaking your flow

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

Download Ray

[Buy Ray for\
434 NOK](https://spatie.be/products/ray)

Licenses are valid for 1 year and managed through [Spatie](https://spatie.be/products/ray). Licenses purchased before Ray 3 remain valid. VAT is calculated at checkout.

## Thanks for trying out Ray!

macOS

[ARM](https://spatie.be/products/ray/v3/download/macos-arm64/latest) [Intel](https://spatie.be/products/ray/v3/download/macos-x64/latest)

Windows

[x86 (Intel)](https://spatie.be/products/ray/v3/download/windows/latest)

Linux

[AppImage](https://spatie.be/products/ray/v3/download/linux/latest)

By downloading Ray, you agree to our [terms of use](/content/terms-of-use/index.html).

The free trial lets you send up to 20 messages per session.
