0% found this document useful (0 votes)
60 views11 pages

1 PHP Get Started m1 Slides

PHP is a scripting language mostly used on web servers. It has approximately 40% market share and is actively maintained as an open-source project. To get started with PHP, it needs to be installed on a web server and configured via the php.ini file. Code is embedded in HTML files with <?php ?> delimiters. The "Hello World" equivalent is phpinfo() which outputs details about the PHP installation. Comprehensive documentation is available at http://php.net/manual.

Uploaded by

Neven Vuckovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views11 pages

1 PHP Get Started m1 Slides

PHP is a scripting language mostly used on web servers. It has approximately 40% market share and is actively maintained as an open-source project. To get started with PHP, it needs to be installed on a web server and configured via the php.ini file. Code is embedded in HTML files with <?php ?> delimiters. The "Hello World" equivalent is phpinfo() which outputs details about the PHP installation. Comprehensive documentation is available at http://php.net/manual.

Uploaded by

Neven Vuckovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

PHP: Get Started

What is PHP?

Christian Wenz
@chwenz
Agenda

 Why PHP?

 Installing PHP

 PHP Quick Start


I've never thought of PHP as more
than a simple tool to solve
problems.

— Rasmus Lerdorf
Why PHP?

 PHP: Hypertext Preprocessor (http://php.net/)

 Scripting language, mostly used on web servers

 Market share: approximately 40% (!)

 In the TIOBE Programming Community Index Top 10 since 1999

 Runs on virtually any web server and platform

 Supports virtually any database

 Open-source, actively maintained

 Great supply of talent


History of PHP

 1994: Rasmus Lerdorf started working on what would later become


PHP

 1995: Release of version 1.0, named “Personal Home Page Tools (PHP
Tools)

 1998: Release of PHP 3 with parser rewritten by Zeev Suraski and Andi
Gutmans

 2000: Release of PHP 4, powered by new core, “Zend Engine”

 2004: Release of PHP 5 (including improved OOP support)

 2009: Release of PHP 5.3 (instead of PHP 6)


Installing PHP

 http://php.net/downloads.php provides access to the source code and


external links to binary packages

 Official Windows binaries: http://windows.php.net/

 All-in-one installer: https://www.apachefriends.org/


 Sets up PHP, Apache, MySQL, and more

 Detailled installation instructions in the online manual:


http://php.net/install
Configuring PHP

 php.ini configuration file (usually in the PHP installation directory)

 Used for PHP settings, and to load extensions

 Usually a server restart is required for changes to take effect


PHP Quick Start

 PHP code is (usually) embedded into HTML files, or in its own PHP file

 File extension: .php (unless configured otherwise)

 <?php and ?> as delimiters


 Other options exist, but are not recommended

 Code output appears exactly where the code was


“Hello World”

 PHP provides the luxury version of “Hello World”

 phpinfo()

 Outputs a lot of data about the PHP installation


 Version information
 Configuration options and settings
 Installed extensions
 Server environment variables

 Can also be used to find out what the hosting partner has provided
Documentation

 Available at http://php.net/manual

 Shortcut: http://php.net/abc, e.g.


 http://php.net/phpinfo
 http://php.net/install
 http://php.net/install.windows

 Also available for download (and offline browsing)


Summary

 PHP is the most popular server language for the web

 PHP runs on all relevant server operating systems

 phpinfo() provides all information about the current PHP


installation

 The PHP manual at http://php.net/manual provides a great


documentation of the language and its extensions

You might also like