Concept

What is the purpose of a Hello World program in PHP?

ComputerScienceOne / Getting Started: Hello World

"37.1. Getting Started: Hello World\n\nThe hallmark of an introduction to a new programming language is the Hello World! program. It consists of a simple program whose only purpose is to print the message “Hello World!” to the user. The simplicity of the program allows the focus to be on the basic syntax of the language. It is also typically used to ensure that your development environment, interpretrer, runtime environment, etc. are functioning properly with a minimal example. A basic Hello World! program in PHP can be found in Code Sample 37.1. A version in which the PHP code is interleaved in HTML is presented in Code Sample 37.2.\n\nCode Sample 37.1.: Hello World Program in PHP\n\n<?php\n\nprintf(\"Hello World\n\n\");\n\n?>\n\nCode Sample 37.2.: Hello World Program in PHP with HTML\n\n<html>\n\n<head>\n\n<title>Hello World PHP Page</title>\n\n</head>\n\n<body>\n\n<h1>A Simple PHP Script</h1>\n\n<?php printf(\"<p>Hello World</p>\"); ?>\n\n</body>\n\n</html>"

Related Ideas

What is the purpose of a Hello World program in PHP? | ComputerScienceOne | Bifalgorithm | Bifalgorithm