Last Updated: February 25, 2016
·
1.155K
· Jean Oliveira Rodrigues

PHP's Hello World!

Newest PHP version(>= 5.4):

<?= "Hello World!"; ?>

edit:

Old PHP versions

<?php echo "Hello World!"; ?>

PS:
The option short_open_tag is always avaible on PHP 5.4 ;)

http://www.php.net/manual/en/ini.core.php#ini.short-open-tag

3 Responses
Add your response

It's worth noting that specific code will only work if the server php shortopentag turned on. I would strongly recommend putting the longer version <?php echo "Hello World"; ?></code> into practice. A longer better description can be found here: http://www.askapache.com/php/shorthand-shortopentag.html

over 1 year ago ·

This option short_open_tag is always avaible on PHP 5.4 ;)

http://www.php.net/manual/en/ini.core.php#ini.short-open-tag

"New is always better"

over 1 year ago ·

touché @jeanmask ;)

over 1 year ago ·