In This Article
In this, PHP Code work article we less talk about actual programming using PHP. We discuss the execution or behind the scene of PHP Code execution.
Introduction about PHP
PHP is a scripting language that is mainly used for web application development. Script or scripting languages are capable of executing without compiled.
PHP used by the largest companies and organizations for developing their web-based applications. PHP language is mandatory for a complete understanding of PHP based popular frameworks like,
- Cake PHP
- Symfony etc..
4 Important Points about PHP Code
- PHP is an interpreted language.
- PHP interpreter will load the source code and execute it.
- The main difference between PHP and other languages like Java and C#, where source-code is compiled then executed.
- In PHP development you don’t have to re-compile your PHP code.
Code Level Introduction of PHP
PHP is written in
.php file extension. PHP codes are saved on webserver directory called
public or mostly server directory named
For example, if your PHP file is saved with name index.php, users could access this file by
4 Step to Run PHP Code Locally
- Install Wamp or XAMPP Server.
- After installing XAMPP (root directory: /htdocs) WaMP ( root directory: /www), use these path for you PHP project.
- Create a
index.phpthe file inside your project directory
- Put the URL on browser like “http://localhost/project_directory_name/file_name.php”
Write First Program in PHP
echo "Hello World!";