PHP

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Created page with "PHP is a widely-used general-purpose open source scripting language that is especially suited for Web development and can be embedded into HTML. While PHP originally stood f...")
 
m (Change telparia.com samples link to template)
 
(29 intermediate revisions by 5 users not shown)
Line 1: Line 1:
PHP is a widely-used general-purpose open source scripting language that is especially suited for Web development and can be embedded into HTML.  
+
{{FormatInfo
 +
|formattype=Languages
 +
|subcat=Programming Languages
 +
|extensions={{ext|php}}, {{ext|phps}}
 +
|pronom={{PRONOM|x-fmt/169}}
 +
|wikidata={{wikidata|Q59}}
 +
|released=1995
 +
}}
 +
'''PHP''' is a widely-used general-purpose open source scripting language that is especially suited for Web development and can be embedded into HTML. While PHP originally stood for Personal Home Page, it is now said to stand for PHP: Hypertext Preprocessor, a recursive acronym.
  
While PHP originally stood for Personal Home Page, it is now said to stand for PHP: Hypertext Preprocessor, a recursive acronym
+
PHP files are often found as text files with the extension '''.php'''. The syntax rules allow [[HTML]] code to be intermixed with the PHP code; some PHP files are mostly static HTML with a few PHP commands embedded, while others are mostly PHP program code with a little bit of HTML. There might be bits of [[JavaScript]] or [[SQL]] too; you might have to understand several different programming and markup languages to fully understand a piece of code.
  
PHP files are often found as text files with the extension .php
+
Sometimes the nonstandard extension [https://stackoverflow.com/questions/41689479/what-is-the-file-extension-phps-and-what-is-it-used-for '''.phps'''] is used when the developer wants the PHP file to be served as source code rather than code executed on the server, for example to share a PHP script.
 +
 
 +
It is one of the possibilities for the P in LAMP (a set of technologies used in many web back-ends, including Linux, Apache, and MySQL, notable for being free, open-source software in contrast to proprietary technologies such as those from Microsoft) along with [[Perl]] and [[Python]]. Its ubiquitousness on the web led to the Wikidata people giving it a rare two-digit ID.
 +
 
 +
== Usage and reception ==
 +
 
 +
As of 2017, PHP sees continued use in highly popular websites including Facebook and Wikipedia, but new projects are using it less and less in favor of Web environments based on [[Python]], [[Ruby]], and [[Node.js]].
 +
 
 +
PHP may be the most widely hated programming language in proportion to its popularity. Critics point out in particular its development origins without any kind of master plan, with a mass of features grafted on over the years with many quirks and "gotcha"s for developers using it. It was also designed to be accessible to nonprogrammers (its original function was for the development of personal home pages, after all), meaning that syntax elements were chosen to be understandable to people who don't understand programming languages, rather than to facilitate more complex uses by power users who do know how to program. This results in all sorts of oddball cases and exceptions where constructs behave as the language developer thought naive users might expect them to rather than with the overall consistency expected by professional programmers.
 +
 
 +
== Specs ==
 +
* [https://github.com/php/php-langspec/blob/master/spec/php-spec-draft.md Draft PHP specification]
 +
 
 +
== Manuals ==
 +
* [http://www.php.net/manual/phpfi2.php PHP 2 manual]
 +
* [http://www.php.net/manual/php3.php PHP 3 manual]
 +
* [http://www.php.net/manual/en/ Current PHP manual]
 +
 
 +
== Criticism ==
 +
* [http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ PHP: A fractal of bad design]
 +
* [http://adambard.com/blog/you-write-php-because-you-dont-know-better/ You use PHP because you don't know better]
 +
* [http://phpmanualmasterpieces.tumblr.com/post/65544023819/php-2-0-a-review-in-retrospect PHP 2.0: A Review in Retrospect]
 +
* [https://twitter.com/TomNomNom/status/195304317601849344/photo/1/large PHP: The Good Parts (satire)]
 +
 
 +
== Software projects ==
 +
* [https://github.com/ab9rf/phaestus Project to create Haskell library to parse PHP code]
 +
* [http://de77.com/ph7-lighweight-php-interpreter Ph7 is a lightweight interpreter of PHP]
 +
 
 +
== Sample files ==
 +
* {{DexvertSamples|text/php}}
 +
 
 +
== Other links ==
 +
* [http://en.wikipedia.org/wiki/PHP PHP (Wikipedia)]
 +
* [http://www.php.net/ Official PHP site]
 +
* [http://news.php.net/php.internals/70691 An explanation of some of the inconsistency in function naming]
 +
* [http://www.php.net/manual/en/features.gc.php Explaining garbage collection in PHP 5.3]
 +
* [http://hhvm.com/blog/5723/announcing-a-specification-for-php Announcing a specification for PHP]
 +
* [https://twitter.com/tim_likes_cake/status/523731718830698496/photo/1 An actual, real paragraph from the draft PHP specification.]
 +
* [http://codecondo.com/tools-for-analyzing-and-parsing-your-php-code/ Top 7 Tools for Analyzing and Parsing Your PHP Code]
 +
* [http://www.techotopia.com/index.php/PHP_Essentials PHP Essentials (online book)]
 +
* [https://en.wikiquote.org/wiki/Rasmus_Lerdorf Quotes from the creator of PHP]
 +
 
 +
[[Category:Web]]

Latest revision as of 02:50, 28 December 2023

File Format
Name PHP
Ontology
Extension(s) .php, .phps
PRONOM x-fmt/169
Wikidata ID Q59
Released 1995

PHP is a widely-used general-purpose open source scripting language that is especially suited for Web development and can be embedded into HTML. While PHP originally stood for Personal Home Page, it is now said to stand for PHP: Hypertext Preprocessor, a recursive acronym.

PHP files are often found as text files with the extension .php. The syntax rules allow HTML code to be intermixed with the PHP code; some PHP files are mostly static HTML with a few PHP commands embedded, while others are mostly PHP program code with a little bit of HTML. There might be bits of JavaScript or SQL too; you might have to understand several different programming and markup languages to fully understand a piece of code.

Sometimes the nonstandard extension .phps is used when the developer wants the PHP file to be served as source code rather than code executed on the server, for example to share a PHP script.

It is one of the possibilities for the P in LAMP (a set of technologies used in many web back-ends, including Linux, Apache, and MySQL, notable for being free, open-source software in contrast to proprietary technologies such as those from Microsoft) along with Perl and Python. Its ubiquitousness on the web led to the Wikidata people giving it a rare two-digit ID.

Contents

[edit] Usage and reception

As of 2017, PHP sees continued use in highly popular websites including Facebook and Wikipedia, but new projects are using it less and less in favor of Web environments based on Python, Ruby, and Node.js.

PHP may be the most widely hated programming language in proportion to its popularity. Critics point out in particular its development origins without any kind of master plan, with a mass of features grafted on over the years with many quirks and "gotcha"s for developers using it. It was also designed to be accessible to nonprogrammers (its original function was for the development of personal home pages, after all), meaning that syntax elements were chosen to be understandable to people who don't understand programming languages, rather than to facilitate more complex uses by power users who do know how to program. This results in all sorts of oddball cases and exceptions where constructs behave as the language developer thought naive users might expect them to rather than with the overall consistency expected by professional programmers.

[edit] Specs

[edit] Manuals

[edit] Criticism

[edit] Software projects

[edit] Sample files

[edit] Other links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox