---
title: "PHP | CoderPad"
description: "Learn more about PHP from CoderPad."
canonical: "https://coderpad.io/languages/php/"
last_modified: "2023-04-17 03:53:40"
---
# PHP online IDE & code editor for technical interviews

Running Zend PHP 8.0 – IntelliSense is not available

### Experience the PHP IDE yourself

See just how easy and intuitive CoderPad Interview is to use below.

[Launch the environment](https://embed.coderpad.io/sandbox?question_id=247198&use_question_button)

## Guidelines to use PHP in this online IDE

You must wrap your code in`<?php`and`?>`tags. Text outside of those tags will output to stdout without processing as PHP.

PHP’s [mcrypt library](https://www.php.net/manual/en/book.mcrypt.php) is also installed.

[PHPUnit](https://phpunit.de/index.html) can be used to write tests. To use it, just run your tests inline after adding the line`use PHPUnit\Framework\TestCase;`like so:

```
<?php
class Greeter
{
    public function sayHello($name)
    {
        return "hi, " . $name;
    }

}

use PHPUnit\Framework\TestCase;

class Solution extends TestCase
{
    private $greeter;

    protected function setUp(): void
    {
        parent::setUp();
        $this->greeter = new Greeter();
    }

    protected function tearDown(): void
    {
        parent::tearDown();
        $this->greeter = NULL;
    }

    public function testSayHello()
    {
        $result = $this->greeter->sayHello("friend");
        $this->assertEquals("hi, friend", $result);
    }
}  Code language: PHP (php)
```

## Need a better way to interview candidates?

[Request a demo](https://coderpad.io/sales/)
