Introduction to PHP
What is PHP?
PHP is a server side scripting language. that is utilized to create Static sites or Dynamic sites or Web applications. PHP remains for Hypertext Pre-processor, that prior remained for Personal Home Pages.
- PHP contents must be translated on a server that has PHP introduced.
- The customer PCs getting to the PHP contents require an internet browser as it were.
- A PHP record contains PHP labels and closures with the expansion ".php".
What is a Scripting Language?
A content is an arrangement of programming directions that is deciphered at runtime.
- A scripting language is a language that deciphers contents at runtime. Contents are normally inserted into other programming situations.
- The motivation behind the contents is for the most part to improve the execution or perform routine assignments for an application.
- Server side contents are deciphered on the server while customer side contents are translated by the customer application.
- PHP is a server side content that is deciphered on the server while JavaScript is a case of a customer side content that is translated by the customer program. Both PHP and JavaScript can be inserted into HTML pages
Programming language
|
Scripting language
|
Has every
one of the highlights expected to create finish applications.
|
Mostly
utilized for routine assignments
|
The code
must be incorporated before it very well may be executed
|
The code
is generally executed without assembling
|
Does not
should be inserted into different languages
|
Is
typically installed into other programming conditions.
|
What does PHP depend on?
PHP implies - Personal Home Page, yet it currently remains for the recursive backronym PHP: Hypertext Preprocessor.
PHP code might be implanted into HTML code, or it tends to be utilized in mix with different web layout frameworks, web content administration framework and web structures.
Why utilize PHP?
You have clearly leader of various programming languages out there; you might ask why we would need to utilize PHP as our toxic substance for the web programming. The following are a portion of the convincing reasons.
- PHP is open source and free.
- Short expectation to learn and adapt contrasted with different languages, for example, JSP, ASP and so forth.
- Vast people group record
- Most web facilitating servers bolster PHP as a matter of course not at all like different languages, for example, ASP that require IIS. This settles on PHP a financially savvy decision.
- PHP is ordinary refreshed to stay up to date with the most recent innovation patterns.
- Other advantage that you get with PHP is that it's a server side scripting language; this implies you just need to introduce it on the server and customer PCs asking for assets from the server don't need PHP introduced; just an internet browser would be sufficient.
- PHP has in assembled bolster for working as an inseparable unit with MySQL; this doesn't mean you can't utilize PHP with other database administration frameworks. You can in any case utilize PHP with
- Postgres
- Prophet
- MS SQL Server
- ODBC and so forth.
PHP is cross stage; this implies you can convey your application on various distinctive working frameworks, for example, windows, Linux, Mac OS and so forth.
What is PHP utilized for and Market share
As far as piece of the overall industry, there are more than 20 million sites and application on the web created utilizing PHP scripting language.
This might be ascribed to the focuses raised previously;
The graph underneath demonstrates a portion of the famous destinations that utilization PHP
What is PHP? Compose your first PHP Program .
PHP versus Asp.Net VS JSP VS CFML
FEATURE
|
PHP
|
ASP
|
JSP
|
CFML
|
Learning
curve
|
short
|
Longer
than PHP
|
Longer
than PHP
|
Longer
than PHP
|
Web
hosting
|
Supported
by all facilitating servers
|
Needs
devoted server
|
Fairly
supported
|
Needs
committed server
|
Open
source
|
Yes
|
No
|
Yes
|
Both
business and open source
|
Web
administrations support
|
Built in
|
Uses the
.NET framework
|
Uses add
on libraries
|
Built in
|
Coordination
with HTML
|
Easy
|
Fairly
complex
|
Fairly
complex
|
Easy
|
MySQL
support
|
Native
|
Needs
outsider drivers
|
Needs
outsider drivers
|
Current
form has local help. More established variants utilize ODBC
|
Effortlessly
stretched out by other languages
|
Yes
|
No
|
Extended
utilizing Java classes and libraries.
|
Yes
|
ASP – Active Server Pages, JSP – Java Server Pages, CFML – Cold Fusion Markup language The table underneath thinks about the different server side scripting languages with PHP
PHP File Extensions
Document expansion and Tags In request for the server to recognize our PHP records and contents, we should spare the record with the ".php" augmentation. More seasoned PHP record augmentations incorporate
- .phtml
- .php3
- .php4
- .php5
- .phps
PHP was intended to work with HTML, and in that capacity, it very well may be inserted into the HTML code.
You can make PHP records with no html labels and that is called Pure PHP document .
The server deciphers the PHP code and yields the outcomes as HTML code to the internet browsers.
All together for the server to recognize the PHP code from the HTML code, we should dependably encase the PHP code in PHP labels.
A PHP label begins with the not as much as image pursued by the question mark and afterward the words "php".
PHP is a case delicate dialect, "VAR" isn't the equivalent as "var".
The PHP labels themselves are not case-touchy, but rather it is firmly suggested that we utilize bring down case letter. The code beneath outlines the above point.
<?php … ?>
We will allude the PHP lines of code as proclamations. PHP explanations end with a semi colon (;). In the event that you just have one proclamation, you can discard the semi colon. On the off chance that you have in excess of one explanation, you should end each fix with a semi colon. For consistency, it is prescribed that you generally end your statement(s) with a semi colon. PHP contents are executed on the server. The yield is returned in type of HTML.
PHP Hello world
The program appeared underneath is an essential PHP application that yields the words "Hi World!" When seen in an internet browser.<?php
resound "Hi world";
?>
output
Hi worldConclusion
- PHP remains for Hypertext pre-processor
- PHP is a server side scripting dialect. This implies it is executed on the server. The customer applications don't need PHP introduced.
- PHP records are spared with the ".php" document expansion, and the PHP improvement code is encased in labels.
- PHP is open source and cross stage
Comments
Post a Comment