Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
REVIEWS ON WEB
APPLICATIONS WITH PHP
AGENDA
Introduction
PHP
Language Basics
Built-in Functions
PHP on Linux and Windows
Tricks and Tips
PHP 5
Examples
Questions?
INTRODUCTION
What is PHP?
PHP
INTRODUCTION
History of PHP
Created
INTRODUCTION
INTRODUCTION
INTRODUCTION
Suraski
More functionality added (OOP features), database
support, protocols and APIs
PHP 3.0 is released in June 1998 with some OO
capability
The core is rewritten in 1998 for improved
performance of complex applications
INTRODUCTION
INTRODUCTION
Engine
INTRODUCTION
Netcraft Statistics
INTRODUCTION
Performance*
Zdnet
Statistics
<script language=PHP">
// Some code here
</script>
ASP-style
tags
Tags
<table>
<tr>
<td>Name:</td><td><?= $name ?></td>
</tr>
<tr>
<td>Address:</td><td><?= $address ?></td>
</tr>
</table>
<script language=PHP>
$hello = Hello;
$world = World!;
print $hello . $world
</script>
a constant
types
types
types
Arrays
Perl-like syntax
same as
$arr[foo] = bar;
$arr[12] = true;
Arrays (cont.)
<?php
$arr = array("somearray" => array(6 => 5, 13 => 9,
"a" => 42));
?>
echo $arr["somearray"][6]; // 5
echo $arr["somearray"][13]; // 9
echo $arr["somearray"]["a"]; // 42
Slow
Functions can not easily change object variables
Statements
if, if/elseif
Switch/case
for, while, and do/while loops
Include and require statements for code reuse
BUILT-IN FUNCTIONS
Manipulator Functions
CCVS:
BUILT-IN FUNCTIONS
Platform independent
Error
Functions
Handling Functions
Filesystem
Functions
BUILT-IN FUNCTIONS
LDAP
Functions
Functions
Functions
BUILT-IN FUNCTIONS
Functions
BUILT-IN FUNCTIONS
Functions (cont.)
MySQL
Oracle
PostgreSQL
SQL Server
MING
Macromedia Flash
BUILT-IN FUNCTIONS
Functions
Regular
Expression Functions
Semaphore
Session
Management Functions
Code Portability
The
Code Portability
Coding
Prototype
Turn
Turn
Debugging
Feature:
Undocumented
language
Debugging
Use
Development Tools
Color
coding editors
IDEs
Windows
Macromedia Dreamweaver
Allaire Homesite
Zends PHPEdit
Linux
???
PHP 5
Release Date
???
Features
Complete
objects