PHP is a server side scripting language. PHP is widely used all over the internet for build web-pages and many web-applications including banking/financial, CMS (Content Management System) and others.
PHP known as ‘hypertext pre-processor’. It’s mostly used for creating dynamic web-pages. It handles HTTP requests between client-side (browser) and server-side.

Why PHP does is better than others technologies like node.js,python (Django),java (jsp)?

  • It’s free and open-source
  • Its cost is low as enterprise level than others
  • Popular framework like WordPress, laravel helps to build complex and good websites.
  • Large number of community support available.
  • Server cost is much lower than others for hosting applications which built with PHP

What is the future of a PHP developer?

There is a good future for a PHP developer. Since now, each and every day internet grows rapidly. For a small and medium business, PHP always a better choice. It’s a better choice for start-ups also. Many companies including Facebook, google also uses PHP for several cases.

  • How does PHP works?

PHP code generally executes on the server-side.Using PHP we can achieve many thingslike getting users form data from client-side. After rendering code on server side it sends a response as HTML text to the client-side. PHP handles each I/O requests at a time. After execution of one task it’s moved into another in the queue. That’s why PHP also said to ‘synchronous’ nature.

Remember: a file ‘.html’ can’t containany PHP code. But a ‘.php’ file can contain HTML code. All the PHP files save with an extension ‘.php’ file.

Let’s understand below code…

<?php
echo “this is code1.php”;
echo “<br>”;
?>
 
<html>
<body>
    this is html code inside php tag…
</body>
</html>
 
<?php
echo “this is footer”;
echo “<br>”;
?>
output

  • What a PHP file can do?
  • It can gets users request using $_GET() or $_POST() methods.
  • It process request over server and then sends requests to the client browser.
  • Its helps to do CRUD operations with relational databases (ex. MySQL)
  • It’s also helps to encrypt user’s data on server side.
  • Which tools we needed to develop a PHP application?

Windows – vs code, xampp server, chrome/edge

Linux – https://www.youtube.com/watch?v=5LZs9mv4rG0

Mac – vs code, xampp server, chrome/edge

What Is Synchronous PHP?

Synchronous PHP code is sequential. Individual tasks must be completed before you can start another one. So with synchronous PHP, the CPU can process only one I/O task at a time. When it completes one task, it moves on to the next one in the queue.

PHP history?

PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer “Rasmus Lerdorf” in 1993 and released in 1995. The PHP reference implementation is now produced by The PHP Group. PHP originally stood for Personal Home Page, but it now stands for the recursive initialism PHP: Hypertext Pre-processor.

PHP code is usually processed on a web server by a PHP interpreter implemented as a module, a daemon or as a Common Gateway Interface (CGI) executable. On a web server, the result of the interpreted and executed PHP code – which may be any type of data, such as generated HTML or binary image data – would form the whole or part of an HTTP response. Various web template systems, web content management systems, and web frameworks exist which can be employed to orchestrate or facilitate the generation of that response. Additionally, PHP can be used for many programming tasks outside the web context, such as standalone graphical applications and robotic drone control. PHP code can also be directly executed from the command line.

Rasmus Lerdorf, was the first creator of PHP.

source: wikipedia.org