PHP Bible – Chapter 1

Download Report

Transcript PHP Bible – Chapter 1

PHP Bible
Chapter 1 : Why PHP?
_______________________________________________________________________________________________________________
PHP Bible, 2nd Edition
1
 Wiley and the book authors, 2002
Why PHP?

Brief Synopsis:
 It’s open-source
 It’s full-featured
 It’s cross-platform
 It’s stable
 It’s fast
 It’s clearly designed
 It’s easy to learn
 It plays well with others
_______________________________________________________________________________________________________________
PHP Bible, 2nd Edition
2
 Wiley and the book authors, 2002
What is PHP?


It is a Web development language written by and for
Web developers
PHP stands for PHP: Hypertext Preprocessor




Originally called Personal Home Page Tools
Executable files can have extensions of .PHP, .PHP3,
.PHTML
Currently in its 5th major rewrite called PHP5
It is a server-side scripting language, which can be
embedded in HTML or used as a standalone
executable.
_______________________________________________________________________________________________________________
PHP Bible, 2nd Edition
3
 Wiley and the book authors, 2002
History of PHP?






Often referred to as the “Open-Source ASP” although
it was actually created prior to ASP
Originally developed by Rasmus Lerdorf to track
people who visited his website
Added SQL capabilities in version 2
In use on 50,000 websites by 1997
Currently maintained by Zeev Suraski and Andi
Gutmans (ZEND) under the OSF model and
contributions from developers world-wide.
In use on over 9,000,000 webservers as of 2002.
_______________________________________________________________________________________________________________
PHP Bible, 2nd Edition
4
 Wiley and the book authors, 2002
Cost comparisons of comparative technologies
Item
ASP
ColdFusion
JSP
PHP
Development
$0-$2,499
tool
$599
$0-$2000
$0-$249
Server
$1,199
$1,295
$0-$35,000
$0
RDBMS
$4999
$4999
$15,000
$0
_______________________________________________________________________________________________________________
PHP Bible, 2nd Edition
5
 Wiley and the book authors, 2002
Other benefits of PHP




Embedded in HTML making it easier to reuse code generated
by others or web development apps
Cross-platform. Can run on Linux, Solaris, BSD, AIX, SCO,
HP-UX, Mac OS-X, Windows, and more. Integrates with
Apache, Netscape server, IIS, PWS, Omni web servers.
Not tag-based (like ColdFusion)
It’s stable (unlike ASP)





Server doesn’t have to be rebooted often (even after an upgrade)
Software doesn’t normally change radically and is backwardcompatible
It’s zippy (unlike CGI or Can’t Go Instantly)
Plays well with others (currently integrates support for at least
15 RDBMSs + ODBC and many Internet protocols)
Can be encrypted so applications can be sold to other parties
who won’t be able to “reverse engineer” your code.
_______________________________________________________________________________________________________________
PHP Bible, 2nd Edition
6
 Wiley and the book authors, 2002
Who uses PHP?

In organizations with established web-based
applications, you will typically find PHP in use at:





Internet-based companies
Technology-oriented companies
Companies with a limited budget
Other companies whose web-based applications were written by a
PHP advocate
Companies which use other web-based application
environments (e.g. Java, ASP) typically include:



Large corporations
Non-technology companies (e.g. hospitals, banks, etc.)
Companies with ties to organizations promoting their own
development environments (e.g. Sun, Microsoft)
_______________________________________________________________________________________________________________
PHP Bible, 2nd Edition
7
 Wiley and the book authors, 2002