PHP vs ColdFusion/Hello World

Hello World was seen as early as 1974 in Bell Laboratorie's internal memorandum by Kernighan &mdash;Programming in C: A Tutorial&mdash; which shows the first known version of the program: main { printf("Hello, world!"); }

In this tutorial we will use one variable named message to display a string of text.

Putting it Together
These files should always be created using a program that doesn't include formating, and saves to a non-rich text format such as notepad.exe (Win32), Pico (Command line), Kedit (KDE), or Gedit (GNOME).

PHP: Test



ColdFusion: Test

 #message#

Line Breakdown
This is a very simple example because they both do the same thing, in the same amount of code. Not too hard so far eh? Lets see what actually makes them tick...

PHP: 07 

Line#07  Ends php

ColdFusion: 07 08    09  #message# 10

Line#07  Starts the ability to output to the browser Line#08 <cfset Stores #message# with the value Hello World! Line#09 #message# Dumps the value Hello World! Line#10  End the ability to output to the browser

What the Browser Sees
Either way, these two scripts produce the same exact page, the only thing different are the server headers. Test

Hello World!

Displayed in Browser
Hello World!