CSSU PRESENTATION PHP Introduction - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

CSSU PRESENTATION PHP Introduction

Description:

PHP is a scripting language that is especially suited for creating ... Code Snippets. SQL Support. Available in multiple languages. Embedded Internet Explorer ... – PowerPoint PPT presentation

Number of Views:68
Avg rating:3.0/5.0
Slides: 28
Provided by: kmts56
Category:

less

Transcript and Presenter's Notes

Title: CSSU PRESENTATION PHP Introduction


1
CSSU PRESENTATIONlt?PHP - Introduction
  • Milan Nankov mln030_at_aubg.bg

2
TABLE OF CONTENTS
  • What is PHP?
  • Getting Started
  • Resources
  • Future Lectures

3
What 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

4
What 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

5
What is PHP? The PHP Architecture
6
What 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

7
What 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

9
What is PHP? - PHP disadvantages?
  • Easy to use gt poorly written code
  • New language gt constant changes
  • No namespaces gt name collisions

10
What is PHP? - PHP versus ASP
11
What 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

12
Getting 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

13
Getting 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

14
Getting 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
15
Getting Started HTML output
  • Two functions allow you to generate HTML output
    print() and echo()

16
Getting Started Embedded in HTML?
17
Getting Started First PHP Script
  • First PHP script DEMO
  • generating dynamic content

18
Getting 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)
19
Getting 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
20
PHP IDEs
  • Zend Studio
  • Nusphere PHPED
  • Waterproof PHPEdit

21
PHP 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)
23
Nusphere phpED Features
  • Code templates
  • Database integration
  • Debugging
  • Code-completion
  • Code-explorer

24
Nusphere phpED Features
  • Code templates
  • Database integration
  • Debugging
  • Code-completion
  • Code-explorer

25
(No Transcript)
26
Waterproof PHPEdit
  • Solution Explorer / Project Manager
  • Keyboard Templates
  • Code Browser
  • Debugger
  • Code Completion
  • Syntax Checker

27
(No Transcript)
28
Resources
  • 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

29
Future Lectures
  • Secure PHP programming
  • Session management
  • Database management
  • Caching
  • Exception handling
  • PHP 6

30
Sources
  • 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
Write a Comment
User Comments (0)
About PowerShow.com