Title: CSSU PRESENTATION PHP Introduction
1CSSU PRESENTATIONlt?PHP - Introduction
- Milan Nankov mln030_at_aubg.bg
2TABLE OF CONTENTS
- What is PHP?
- Getting Started
- Resources
- Future Lectures
3What is PHP?
- PHP is a scripting language that is especially
suited for creating web applications - PHP is an Open Source language
- PHP is a cross-platform language Unix, Linux,
Windows, Mac OS - PHP is a server-side language
- PHP usually runs on a web server
- PHP is based on the Zend Engine
4What is PHP? - What can PHP do?
- There are three main areas where PHP scripts are
used - Command line scripting.
- Writing desktop applications.
- Web development.
- Generate dynamic html content
- Send/receive cookies
- Database support
- Flash animation generation
- Session management
- XML support
5What is PHP? The PHP Architecture
6What is PHP? - The Zend Engine
- Parses and executes all of your PHP files.
- Provides in-memory compilation and execution of
PHP scripts - Implements of all of the standard data structures
of PHP - Provides interface with extension modules for
connectivity to external resources and protocols,
such as SQL, HTTP and FTP, etc. - Provides memory management and resource management
7What is PHP? - How does PHP work?
8 What is PHP? PHP Advantages?
- Designed for the Web- Fast execution- Can
handle heavy traffic - Easy to Use- Enhanced productivity- Cost
reduction - Open source- Rapid technology advancement-
Superior code quality - Cross-Platform- Portable code
9What is PHP? - PHP disadvantages?
- Easy to use gt poorly written code
- New language gt constant changes
- No namespaces gt name collisions
10What is PHP? - PHP versus ASP
11What is PHP? - Popularity of PHP
- Companies using PHPYahoo!, Cisco, Worldcom,
Vodafone, Motorola, Siemens, Ericsson, CBS,
Unilever, Philips, Air Canada, Lufthansa,
OnVista, Lycos Europe and Deutsche Bank. - PHP is Installed on 22,172,983 domains
- TIOBE Programming Community Index
12Getting Started - New Features in PHP 5
- New Object Model
- New Object Features
- New Memory Manager
- Exception handling
- XML and Web Services
- New MySQLi (MySQL Improved) extension
13Getting Started - The PHP Language
- PHP borrowed much of its syntax from C and Perl
- The PHP code begins with the tag lt?php and ends
with ?gt - PHP statements end with a semicolon '
- Variables in PHP are prefixed by a dollar sign
(''). - Control structures if, else, elseif, while,
do-while, for, foreach, break, continue, switch,
return - Support for Object-Oriented Programming
- Loosely Typed
14Getting Started - PHP Variables
lt?php str '5 monkeys' // string
variable num 45 // int variable flag
2.2 // float variable ////////////////////////
/// // Type juggling flag True // changes
to boolean num flag // 46 num
str // 51 ?gt
15Getting Started HTML output
- Two functions allow you to generate HTML output
print() and echo()
16Getting Started Embedded in HTML?
17Getting Started First PHP Script
- First PHP script DEMO
- generating dynamic content
18Getting Started - PHP Classes
class CSSU private president private
vice public function SetVice(newvice)
this-gtvice newvice
function __construct(pr, vice)
this-gtpresident pr this-gtvice vice
cssu new CSSU(xxx, yyy)
19Getting Started - Including Files
lt?php // lib.php function foo() echo
(Hello, PHP!) ?gt
lt?php // index.html require(lib.php)//
include(lib.php)// require_once(lib.php) //
Include_once(lib.php) foo() ?gt
20PHP IDEs
- Zend Studio
- Nusphere PHPED
- Waterproof PHPEdit
21PHP IDEs - Zend Studio Features
- PHP Code Analysis
- Web Services Support (SOAP)
- Code Snippets
- SQL Support
- Available in multiple languages
- Embedded Internet Explorer
- Debugger
- Templates
- Code Completion
22(No Transcript)
23Nusphere phpED Features
- Code templates
- Database integration
- Debugging
- Code-completion
- Code-explorer
24Nusphere phpED Features
- Code templates
- Database integration
- Debugging
- Code-completion
- Code-explorer
25(No Transcript)
26Waterproof PHPEdit
- Solution Explorer / Project Manager
- Keyboard Templates
- Code Browser
- Debugger
- Code Completion
- Syntax Checker
27(No Transcript)
28Resources
- WEB
- - www.php.net
- - www.zend.com
- - http//codewalkers.com/
- - http//www.hotscripts.com/PHP/
- Yahoo groups (http//groups.yahoo.com/)
- - php-gurus
- - php-list
- - php-objects
29Future Lectures
- Secure PHP programming
- Session management
- Database management
- Caching
- Exception handling
- PHP 6
30Sources
- Zend (www.zend.com)- http//www.zend.com/zend/art
/intro.php- http//www.zend.com/zend/aboutphp.php
- PHP (www.php.net)- http//www.php.net/usage.php
- Tiobe (http//www.tiobe.com/tpci.htm)-
http//www.tiobe.com/tpci.htm