It has been quite some time since I started working as a PHP developer , and I've been contemplating the idea of sharing my knowledge of PHP with readers. In this post, I aim to provide an overview of PHP for beginners.
Definition and Full Form:
To begin with, PHP is a server-side scripting language that was first introduced by Rasmus Lerdorf in 1994. The term PHP is an acronym that stands for Personal Home Page, but it is now more commonly referred to as PHP: Hypertext Preprocessor.
What is server-side scripting language?Server-side scripting language execute (run) on the server. server-side environment that runs a scripting language is a web server. A user 's request is fulfilled by running a script directly on the web server to generate dynamic HTML pages. This HTML is then sent to the client browser. It is usually used to provide interactive web sites that interface to databases or other data stores on the server.
As a server-side scripting language, PHP is primarily used for building dynamic web applications that can run on various web servers, such as Apache and Nginx. With PHP, developers can create web pages that can interact with databases, process user input, and generate dynamic content.
For beginners who are just starting to learn PHP, it is essential to understand the basics of the language, such as its syntax and structure. PHP code is executed on the server, and the output is sent to the user's browser in the form of HTML. To execute PHP code , it must be written within special tags that start with "".
One of the significant benefits of PHP is its compatibility with various platforms and operating systems, including Windows, Linux, and macOS. Additionally, PHP has a vast community of developers who have created numerous frameworks, libraries, and tools to make web development faster and more efficient.
What You Mean By Hypertext Preprocessor ?Hypertext Preprocessor (It is a recursive acronym, if you can understand what that means.) PHP is an HTML-embedded Web scripting language. This means PHP code can be inserted into the HTML of a Web page. When a PHP page is accessed, the PHP code is read or "parsed" by the server the page resides on. The output from the PHP functions on the page are typically returned as HTML code, which can be read by the browser. Because the PHP code is transformed into HTML before the page is loaded, users cannot view the PHP code on a page. This make PHP pages secure enough to access databases and other secure information.
PHP5
PHP 5 was released in July 2004 . It is mainly driven by its core, the Zend Engine 2.0 with a new object model and dozens of other new features. PHP-related and supporting projects, such as PEAR, PECL, and documentation, and an underlying network infrastructure of well over one-hundred individual web servers on six of the seven continents of the world.
Example Syntax.
<?phpOutput:Hello World
echo "Hello World";
?>