What is PHP

  • PHP stands for PHP: Hypertext Preprocessor
  • PHP is a server-side scripting language, like ASP
  • PHP scripts are executed on the server
  • PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
  • PHP is an open source software (OSS)
  • PHP is free to download and use
  • PHP files may contain text, HTML tags and scripts
  • PHP files are returned to the browser as plain HTML
  • PHP files have a file extension of “.php”, “.php3”, or “.phtml”.
  • The PHP code start with <? php and ends with ?>
  • In PHP, we use // to make a single-line comment or /* and */ to make a large comment block.
  • The concatenation operator is (.) a dot . can be used to concatenate strings or variables.
  • PHP variables are case sensitive but the functions are not case sensitive.
OperatorDescriptionExample
$i==$jequal to5==8 returns false
$i===$jValue and type both are equal
!=not equal5!=8 returns true
!==Value and type both are not equal
<> Not equal to
is greater than5>8 returns false
is less than5<8 returns true
>=is greater than or equal to5>=8 returns false
<=is less than or equal to5<=8 returns true