How PHP Code Works

Bikash Panda
2 min readMar 20, 2020

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,

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.

Also Check:

Load Dynamic Content in Bootstrap Modal using Ajax

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 publi_html .

For example, if your PHP file is saved with name index.php, users could access this file by

http://example.com/index.php

Web Programming with PHP

4 Step to Run PHP Code Locally

  1. Install Wamp or XAMPP Server.
  2. After installing XAMPP (root directory: /htdocs) WaMP ( root directory: /www), use these path for you PHP project.
  3. Create a index.php the file inside your project directory
  4. Put the URL on browser like “http://localhost/project_directory_name/file_name.php"

Write First Program in PHP

<?php
echo “Hello World!”;
?>

JavaScript Array | Array length, push, pop, shift, unshift, IndexOf, forEach

Happy Coding..!

Originally published at http://phpcoder.tech on March 20, 2020.

--

--

Bikash Panda

I am a web application developer. FB Community: @mrpandatech, Twitter: @phpcodertech My PHP problem-solving site http://phpcoder.tech