Playground API Client
The PlaygroundClient
object implements the UniversalPHP
interface. All the methods from that interface are also available in Node.js and same-process PHP instances (Playground runs PHP in a web worker).
Broadly speaking, you can use the client to perform three types of operations:
- Running PHP code
- Customizing
PHP.ini
- Managing files and directories
Running PHP code
The two methods you can use to run PHP code are:
In Node.js, you can also use the cli()
method to run PHP in a CLI mode.