----------------------------------- Code 1 ----------------------------------- echo ("Testing") ; ----------------------------------- Code 2 ----------------------------------- echo "Testing" ; // () is not necessary in echo ----------------------------------- Code 3 ----------------------------------- echo << Hello . END; ----------------------------------- Code 4 ----------------------------------- print ("Testing") ; ----------------------------------- Code 5 ----------------------------------- define ("CONSTANT", "Hello world.") ; print CONSTANT ; ----------------------------------- Code 6 ----------------------------------- $a = array('5', '10', '15', '20') ; // Defining an array print_r ($a) ; // print all array elements ----------------------------------- Code 7 ----------------------------------- echo ("
") ; // 
 is an HTML code : to show the result more readable
print_r ($GLOBALS) ; // $GLOBALS is a predefinrd array style variable

----------------------------------- Code 8 -----------------------------------
highlight_file ("php.php") ; // Print out entire file in highlight mode