Run PHP in your browser
PHP 8.3Runs in your browserRun PHP 8.3 code online in your browser. No sign-up needed.
Run PHP in your browser
Code
Output
How to use
- Type PHP into the editor and press Run; PHP 8.3 runs inside your browser. The first run downloads about 3 MB, later runs start at once.
- Output from
echo,print_randvar_dumpappears below, with error lines in red, plus the time taken and the PHP version. - Load any example from the learning topics with the example picker and change it.
Good to know
- Outgoing connections are blocked, so
file_get_contents('https://...')fails. - A run stops after 5 seconds or 1 MB of output, which also ends endless loops.
- Browser PHP is a 32-bit build, so
PHP_INT_MAXis 2147483647, and it has no mbstring or intl.strlen()counts bytes, not characters. - Databases (PDO MySQL, SQLite), sessions and uploads need a server and do not run here.
Questions people ask
Which PHP version runs here?
PHP 8.3. The exact version appears next to each result.
Can I call a database or an outside API?
No. Outgoing connections are blocked and there is no MySQL server. Use it to test code that works on strings, arrays and classes.
Is my code saved?
Not on the page. As with our other tools, usage logs keep the code you ran and its result.