Programming Language

PHP

PHP (programminglanguage)
Full NameHypertext Preprocessor
Short NamePHP
DescriptionPHP is a server-side scripting language designed primarily for web development
CompanyUnkown
WebYes
MobileNo
EnterpriseNo
EmbeddedNo

What is PHP?

PHP is a server-side scripting language that is commonly used for web development. It is open-source and free to use, and can be embedded in HTML code to create dynamic web pages.

What are some features of PHP?

PHP includes features such as dynamic typing, automatic memory management, and support for object-oriented programming. It also includes built-in functions for a wide range of tasks, including file handling, database access, and regular expressions.

How is PHP used in web development?

PHP is commonly used in web development for server-side scripting, creating dynamic web pages, and interacting with databases and other web services. It can be used with a wide range of web frameworks, including Laravel, Symfony, and CodeIgniter.

What are some popular PHP frameworks and libraries?

Some popular PHP frameworks and libraries for web development include Laravel, Symfony, CodeIgniter, and CakePHP.

Is PHP still relevant today?

Yes, PHP is still widely used today, particularly for web development. It is estimated that over 75% of all websites on the internet use PHP in some capacity.

What is the difference between PHP and other server-side scripting languages such as ASP.NET or JSP?

PHP, ASP.NET, and JSP are all server-side scripting languages that are commonly used for web development. However, they have different syntax and features. PHP is open-source and can run on a wide range of web servers, while ASP.NET and JSP are proprietary and are typically used with specific web servers such as IIS or Tomcat.

Snippet from Wikipedia: PHP

PHP is a general-purpose scripting language geared towards 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 was originally an abbreviation of Personal Home Page, but it now stands for the recursive acronym PHP: Hypertext Preprocessor.

PHP code is usually processed on a web server by a PHP interpreter implemented as a module, a daemon or 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 that 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 drone control. PHP code can also be directly executed from the command line.

The standard PHP interpreter, powered by the Zend Engine, is free software released under the PHP License. PHP has been widely ported and can be deployed on most web servers on a variety of operating systems and platforms.

The PHP language has evolved without a written formal specification or standard, with the original implementation acting as the de facto standard that other implementations aimed to follow.

W3Techs reports that as of 27 October 2024 (about two years since PHP 7 was discontinued and 11 months after the PHP 8.3 release), PHP 7 is still used by 50.0% of PHP websites, which is outdated and known to be insecure. In addition the even more outdated (discontinued for 5+ years) and insecure PHP 5 is used by 13.2% and the no longer supported PHP 8.0 is also very popular. Meaning the vast majority do not use the supported versions.

GitHub Topics

PHP is a popular general-purpose scripting language that's particularly suited for server-side web development. PHP runtime is generally executed by webpage content, and can be added to HTML and HTML5 webpages. PHP was originally developed in 1994 by Rasmus Lerdorf.

<?php
    echo 'Hello, world!';
?>

Source: Wikibooks

## ToDo ##

  • FIXME
  • Variables
  • Control structures
  • Arrays
  • Functions
  • Object-oriented programming (OOP)
  • Classes
  • Inheritance
  • Polymorphism
  • Interfaces
  • Abstract classes
  • Namespaces
  • Error handling
  • Exception handling
  • Input/output operations
  • File handling
  • Regular expressions
  • Sessions and cookies
  • Forms handling
  • Database connectivity
  • MySQL
  • PDO (PHP Data Objects)
  • PHP frameworks (e.g., Laravel, Symfony)
  • Content Management Systems (e.g., WordPress, Drupal)

See also: Programming Languages

  • dev/php.txt
  • Last modified: 2023/05/01 17:27
  • by Henrik Yllemo