Free Online PHP Code Explainer
Explain code snippets from PHP.
How to use the PHP explainer
- Paste your PHP code snippet in the input box and click the "Explain" button.
- Our AI will generate an explanation for your code.
How do you process our code? Is it secure?
We don't store any of your code. We send your code to OpenAI's servers for explanation. OpenAI does not store your code either.
About PHP
PHP is a general-purpose scripting language especially suited to web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994. The PHP reference implementation is now produced by The PHP Group.
PHP code examples
Hello World in PHP
<?php echo "Hello, World!"; ?>
Fibonacci in PHP
<?php
function fibonacci($n) {
$a = 0;
$b = 1;
for ($i = 0; $i < $n; $i++) {
echo $a . "\n";
$temp = $a;
$a = $b;
$b = $temp + $b;
}
}
fibonacci(10);