PHP by Example

Hello, world

The simplest program you can write in any language is one that writes "Hello, world" to the console. Here's the source code.

<?php

echo 'Hello, world';

To run the script, place this code inside of a file called script.php and use the php command.

$ php ./script.php
Next: Values