SlideShare ist ein Scribd-Unternehmen logo
1 von 37
SSyynnaappsseeiinnddiiaa RReevviieewwss 
DDeevveellooppiinngg WWeebb 
AApppplliiccaattiioonnss wwiitthh PPHHPP
AAggeennddaa 
– Introduction 
– PHP Language Basics 
– Built-in Functions 
– PHP on Linux and Windows 
– Tricks and Tips 
– PHP 5 
– Examples 
– Questions?
IInnttrroodduuccttiioonn 
• What is PHP? 
– PHP stands for "PHP Hypertext 
Preprocessor” 
– An embedded scripting language for HTML 
like ASP or JSP 
– A language that combines elements of 
Perl, C, and Java
IInnttrroodduuccttiioonn 
• History of PHP 
– Created by Rasmus Lerdorf in 1995 for 
tracking access to his resume 
– Originally a set of Perl scripts known as the 
“Personal Home Page” tools 
– Rewritten in C with database functionality 
– Added a forms interpreter and released as 
PHP/FI: includes Perl-like variables, and 
HTML embedded syntax
IInnttrroodduuccttiioonn 
• History of PHP (cont.) 
– Rewritten again in and released as version 
2.0 in November of 1997 
– Estimated user base in 1997 is several 
thousand users and 50,000 web sites 
served 
– Rewritten again in late 1997 by Andi 
Gutmans and Zeev Suraski 
– More functionality added, database 
support, protocols and APIs
IInnttrroodduuccttiioonn 
• History of PHP (cont.) 
– User base in 1998 estimated 10,000 users 
and 100,000 web sites installed 
– Version 3.0 was released in June 1998 as 
PHP 
– Estimated user base in tens of thousands 
and hundreds of thousands of web sites 
served
IInnttrroodduuccttiioonn 
• History of PHP (cont.) 
– Rewritten again in 1997 by Andi Gutmans 
and Zeev 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
IInnttrroodduuccttiioonn 
• History of PHP (cont.) 
– The core is rewritten in 1998 by Zeev and 
Andi and dubbed the “Zend Engine” 
– The engine is introduced in mid 1999 and 
is released with version 4.0 in May of 2000 
– The estimated user base is hundreds of 
thousands of developers and several 
million of web sites served
IInnttrroodduuccttiioonn 
• History of PHP (cont.) 
– Version 5.0 will include version 2.0 of the 
Zend Engine 
• New object model is more powerful and 
intuitive 
• Objects will no longer be passed by value; they 
now will be passed by reference 
• Increases performance and makes OOP more 
attractive
IInnttrroodduuccttiioonn 
• Netcraft Statistics 
– 11,869,645 Domains, 1,316,288 IP Addresses
IInnttrroodduuccttiioonn 
• Performance* 
– Zdnet Statistics 
• PHP pumped out about 47 pages/second 
• Microsoft ASP pumped out about 43 
pages/second 
• Allaire ColdFusion pumped out about 29 
pages/second 
• Sun Java JSP pumped out about 13 
pages/second
PPHHPP LLaanngguuaaggee BBaassiiccss 
• The Script Tags 
– All PHP code is contained in one of several 
script tags: 
• <? 
// Some code 
?> 
• <?php 
// Some code here 
?>
PPHHPP LLaanngguuaaggee BBaassiiccss 
• The Script Tags (cont.) 
• <script language=“PHP"> 
// Some code here 
</script> 
– ASP-style tags 
• Introduced in 3.0; may be removed in the future 
• <% 
// Some code here 
%>
PPHHPP LLaanngguuaaggee BBaassiiccss 
• The Script Tags (cont.) 
– “Echo” Tags 
– <table> 
<tr> 
<td>Name:</td><td><?= $name ?></td> 
</tr> 
<tr> 
<td>Address:</td><td><?= $address ?></td> 
</tr> 
</table>
PPHHPP LLaanngguuaaggee BBaassiiccss 
• Hello World!: An Example 
– Like Perl, there is more than one way to do 
it 
• <?php echo “Hello World!”; ?> 
• <?php 
$greeting = “Hello World!” 
printf(“%s”, $greeting); 
php?>
PPHHPP LLaanngguuaaggee BBaassiiccss 
• Hello World!: An Example (cont.) 
• <script language=“PHP”> 
$hello = “Hello”; 
$world = “World!”; 
print $hello . $world 
</script>
PPHHPP LLaanngguuaaggee BBaassiiccss 
• Constants, Data Types and 
Variables 
– Constants define a string or numeric value 
– Constants do not begin with a dollar sign 
– Examples: 
• define(“COMPANY”, “Acme Enterprises”); 
• define(“YELLOW”, “#FFFF00”); 
• define(“PI”, 3.14); 
• define(“NL”, “<br>n”);
PPHHPP LLaanngguuaaggee BBaassiiccss 
• Constants, Data Types and 
Variables 
– Using a constant 
• print(“Company name: “ . COMPANY . NL);
PPHHPP LLaanngguuaaggee BBaassiiccss 
• Constants, Data Types and 
Variables 
– Data types 
• Integers, doubles and strings 
– isValid = true; // Boolean 
– 25 // Integer 
– 3.14 // Double 
– ‘Four’ // String 
– “Total value” // Another string
PPHHPP LLaanngguuaaggee BBaassiiccss 
• Constants, Data Types and 
Variables 
– Data types 
• Strings and type conversion 
– $street = 123; 
– $street = $street . “ Main Street”; 
– $city = ‘Naperville’; 
$state = ‘IL’; 
– $address = $street; 
– $address = $address . NL . “$city, $state”; 
– $number = $address + 1; // $number equals 
124
PPHHPP LLaanngguuaaggee BBaassiiccss 
• Constants, Data Types and 
Variables 
– Data types 
• Arrays 
– Perl-like syntax 
• $arr = array("foo" => "bar", 12 => true); 
– same as 
• $arr[“foo”] = “bar”; 
• $arr[12] = true;
PPHHPP LLaanngguuaaggee BBaassiiccss 
• Constants, Data Types and 
Variables 
• 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 
?>
PPHHPP LLaanngguuaaggee BBaassiiccss 
• Constants, Data Types and 
Variables 
– Objects 
– Currently not much more advanced than than 
associative arrays Using constants 
– Before version 5.0, objects are passed by value 
• Slow 
• Functions can not easily change object variables
PPHHPP LLaanngguuaaggee BBaassiiccss 
• Constants, Data Types and 
Variables 
– Operators 
– Contains all of the operators like in C and Perl (even 
the ternary) 
– Statements 
– if, if/elseif 
– Switch/case 
– for, while, and do/while loops 
– Include and require statements for code reuse
BBuuiilltt--iinn FFuunnccttiioonnss 
• What comes In the box? 
– Array Manipulator Functions 
• sort, merge, push, pop, slice, splice, keys, 
count 
– CCVS: Interface to Red Hat’s credit system 
– COM functions: Interface to Windows COM 
objects 
– Date and Time Functions 
• getdate, mkdate, date, gettimeofday, localtime, 
strtotime, time
BBuuiilltt--iinn FFuunnccttiioonnss 
• What comes In the box? 
– Directory Functions 
• Platform independent 
– Error Handling Functions 
• Recover from warnings and errors 
– Filesystem Functions 
• Access flat files 
• Check directory, link, and file status information 
• Copy, delete, and rename files
BBuuiilltt--iinn FFuunnccttiioonnss 
• What comes In the box? 
– IMAP Functions 
• Manipulate mail boxes via the IMAP protocol 
– LDAP Functions 
• Works with most LDAP servers 
– Mail Functions 
• mail($recipient, $subject, $message)
BBuuiilltt--iinn FFuunnccttiioonnss 
• What comes In the box? 
– Database Functions 
• dba: dbm-style abstraction layer 
• dBase 
• Frontbase 
• Informix 
• Ingres II 
• Interbase 
• mSQL
BBuuiilltt--iinn FFuunnccttiioonnss 
• What comes In the box? 
– Database Functions (cont.) 
• MySQL 
• Oracle 
• PostgreSQL 
• SQL Server 
– MING 
• Macromedia Flash 
– PDF 
• Create/manipulate PDF files dynamically
BBuuiilltt--iinn FFuunnccttiioonnss 
• What comes In the box? 
– POSIX Functions 
• Manipulate process information 
– Regular Expression Functions 
• Uses POSIX regex 
– Semaphore and Socket Functions 
• Available only on Unix 
– Session Management Functions
PPHHPP oonn LLiinnuuxx aanndd 
WWiinnddoowwss 
• Code Portability 
– The obvious: don’t use Unix or Windows 
specific functions 
– Create a reusable module for file system 
differences, for example: 
– if( PHP_OS == "Linux" ) 
{ 
$ConfigPath = "/var/www/conf"; 
$DataPath = "/var/www/data"; 
}
PPHHPP oonn LLiinnuuxx aanndd 
WWiinnddoowwss 
• Code Portability 
– if( ereg("WIN", PHP_OS) ) 
{ 
$ApachePath = “C:/Program Files/Apache 
Group/Apache”; 
$ConfigPath = ”$ApachePath/htdocs/conf"; 
$DataPath = "$ApachePath/htdocs/data"; 
} 
$ConfigFile = "$ConfigPath/paperwork.conf"; 
$CountryList = "$DataPath/countries.txt"; 
$StateAbbrList = "$DataPath/usstateabbrs.txt"; 
$StateNameList = "$DataPath/usstatenames.txt";
TTrriicckkss aanndd TTiippss 
• Coding 
– Prototype your web pages first 
• Separate the design of the site from the coding 
– Turn repetitive code into functions 
• Makes for more maintainable and reusable 
code 
– Turn grunt code into functions 
• Database access, configuration file access
TTrriicckkss aanndd TTiippss 
• Debugging 
– Feature: PHP is not a strongly typed 
language 
• Variables can be created anywhere in your 
code 
– Undocumented Feature: PHP is not a 
strongly typed language 
• Typos in variable names will cause stuff to 
happen
TTrriicckkss aanndd TTiippss 
• Debugging 
– Use scripts to dump form and session 
variables 
• Write scripts to dump data to discover bad or 
missing data
TTrriicckkss aanndd TTiippss 
• Development Tools 
– Color coding editors 
• vim, Emacs, Visual SlickEdit 
– IDEs 
• Windows 
– Macromedia Dreamweaver 
– Allaire Homesite 
– Zend’s PHPEdit 
• Linux 
– ???
PPHHPP 55 
• Release Date 
– ??? 
• Features 
– Complete objects 
• Objects with constructors 
• Abstract classes 
• Private, protected and abstract functions 
• Private, protected and constant variables 
• Namespaces 
• Exception handling with try/catch blocks

Weitere ähnliche Inhalte

Was ist angesagt?

Slow Database in your PHP stack? Don't blame the DBA!
Slow Database in your PHP stack? Don't blame the DBA!Slow Database in your PHP stack? Don't blame the DBA!
Slow Database in your PHP stack? Don't blame the DBA!Harald Zeitlhofer
 
Hbase Introduction
Hbase IntroductionHbase Introduction
Hbase IntroductionKim Yong-Duk
 
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유비윈도우즈 환경의 기술 서적 번역 도구 경험 공유
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유Younggun Kim
 
Puppet Camp DC: Puppet for Everybody
Puppet Camp DC: Puppet for EverybodyPuppet Camp DC: Puppet for Everybody
Puppet Camp DC: Puppet for EverybodyPuppet
 
An Introduction to Apache Pig
An Introduction to Apache PigAn Introduction to Apache Pig
An Introduction to Apache PigSachin Vakkund
 
Commands documentaion
Commands documentaionCommands documentaion
Commands documentaionTejalNijai
 
Perl for System Automation - 01 Advanced File Processing
Perl for System Automation - 01 Advanced File ProcessingPerl for System Automation - 01 Advanced File Processing
Perl for System Automation - 01 Advanced File ProcessingDanairat Thanabodithammachari
 
NoSQL and Triple Stores
NoSQL and Triple StoresNoSQL and Triple Stores
NoSQL and Triple Storesandyseaborne
 
Drupal Themes
Drupal ThemesDrupal Themes
Drupal Themesakosh
 
05.linux basic-operations-1
05.linux basic-operations-105.linux basic-operations-1
05.linux basic-operations-1Minsuk Lee
 
eZ Publish Cluster Unleashed
eZ Publish Cluster UnleashedeZ Publish Cluster Unleashed
eZ Publish Cluster UnleashedBertrand Dunogier
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?Wong Hoi Sing Edison
 
Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Ahmed El-Arabawy
 

Was ist angesagt? (20)

Slow Database in your PHP stack? Don't blame the DBA!
Slow Database in your PHP stack? Don't blame the DBA!Slow Database in your PHP stack? Don't blame the DBA!
Slow Database in your PHP stack? Don't blame the DBA!
 
Hbase Introduction
Hbase IntroductionHbase Introduction
Hbase Introduction
 
05php
05php05php
05php
 
PHP and databases
PHP and databasesPHP and databases
PHP and databases
 
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유비윈도우즈 환경의 기술 서적 번역 도구 경험 공유
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유
 
Puppet Camp DC: Puppet for Everybody
Puppet Camp DC: Puppet for EverybodyPuppet Camp DC: Puppet for Everybody
Puppet Camp DC: Puppet for Everybody
 
An Introduction to Apache Pig
An Introduction to Apache PigAn Introduction to Apache Pig
An Introduction to Apache Pig
 
Uploading a file with php
Uploading a file with phpUploading a file with php
Uploading a file with php
 
Commands documentaion
Commands documentaionCommands documentaion
Commands documentaion
 
Perl Programming - 03 Programming File
Perl Programming - 03 Programming FilePerl Programming - 03 Programming File
Perl Programming - 03 Programming File
 
php
phpphp
php
 
PHP-GTK
PHP-GTKPHP-GTK
PHP-GTK
 
Perl for System Automation - 01 Advanced File Processing
Perl for System Automation - 01 Advanced File ProcessingPerl for System Automation - 01 Advanced File Processing
Perl for System Automation - 01 Advanced File Processing
 
NoSQL and Triple Stores
NoSQL and Triple StoresNoSQL and Triple Stores
NoSQL and Triple Stores
 
Drupal Themes
Drupal ThemesDrupal Themes
Drupal Themes
 
rtwerewr
rtwerewrrtwerewr
rtwerewr
 
05.linux basic-operations-1
05.linux basic-operations-105.linux basic-operations-1
05.linux basic-operations-1
 
eZ Publish Cluster Unleashed
eZ Publish Cluster UnleashedeZ Publish Cluster Unleashed
eZ Publish Cluster Unleashed
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
 
Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities
 

Andere mochten auch

Synapse india reviews on android and ios
Synapse india reviews on android and iosSynapse india reviews on android and ios
Synapse india reviews on android and iossaritasingh19866
 
Synapse india complaints iphone or ipad application development
Synapse india complaints iphone or ipad application developmentSynapse india complaints iphone or ipad application development
Synapse india complaints iphone or ipad application developmentsaritasingh19866
 
Synapse india reviews on cross plateform mobile apps development
Synapse india reviews on cross plateform mobile apps developmentSynapse india reviews on cross plateform mobile apps development
Synapse india reviews on cross plateform mobile apps developmentsaritasingh19866
 
Synapseindia drupal intro 0
Synapseindia drupal intro 0Synapseindia drupal intro 0
Synapseindia drupal intro 0saritasingh19866
 
Synapse india reviews on mobile and tablet computing
Synapse india reviews on mobile and tablet computingSynapse india reviews on mobile and tablet computing
Synapse india reviews on mobile and tablet computingsaritasingh19866
 
Introduction to Website Design and Development
Introduction to Website Design and DevelopmentIntroduction to Website Design and Development
Introduction to Website Design and DevelopmentNana Kofi Annan PhD
 
Synapseindia mobile apps cellular networks and mobile computing part1
Synapseindia mobile apps cellular networks and mobile computing part1Synapseindia mobile apps cellular networks and mobile computing part1
Synapseindia mobile apps cellular networks and mobile computing part1saritasingh19866
 

Andere mochten auch (7)

Synapse india reviews on android and ios
Synapse india reviews on android and iosSynapse india reviews on android and ios
Synapse india reviews on android and ios
 
Synapse india complaints iphone or ipad application development
Synapse india complaints iphone or ipad application developmentSynapse india complaints iphone or ipad application development
Synapse india complaints iphone or ipad application development
 
Synapse india reviews on cross plateform mobile apps development
Synapse india reviews on cross plateform mobile apps developmentSynapse india reviews on cross plateform mobile apps development
Synapse india reviews on cross plateform mobile apps development
 
Synapseindia drupal intro 0
Synapseindia drupal intro 0Synapseindia drupal intro 0
Synapseindia drupal intro 0
 
Synapse india reviews on mobile and tablet computing
Synapse india reviews on mobile and tablet computingSynapse india reviews on mobile and tablet computing
Synapse india reviews on mobile and tablet computing
 
Introduction to Website Design and Development
Introduction to Website Design and DevelopmentIntroduction to Website Design and Development
Introduction to Website Design and Development
 
Synapseindia mobile apps cellular networks and mobile computing part1
Synapseindia mobile apps cellular networks and mobile computing part1Synapseindia mobile apps cellular networks and mobile computing part1
Synapseindia mobile apps cellular networks and mobile computing part1
 

Ähnlich wie Synapse india reviews on php website development

Ähnlich wie Synapse india reviews on php website development (20)

phpwebdev.ppt
phpwebdev.pptphpwebdev.ppt
phpwebdev.ppt
 
Php
PhpPhp
Php
 
Phpwebdev
PhpwebdevPhpwebdev
Phpwebdev
 
Phpwebdevelping
PhpwebdevelpingPhpwebdevelping
Phpwebdevelping
 
Modern php
Modern phpModern php
Modern php
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
PHP and MySQL
PHP and MySQLPHP and MySQL
PHP and MySQL
 
Php
PhpPhp
Php
 
Php
PhpPhp
Php
 
Php
PhpPhp
Php
 
Basics PHP
Basics PHPBasics PHP
Basics PHP
 
Top ten-list
Top ten-listTop ten-list
Top ten-list
 
PHP
PHPPHP
PHP
 
php (Hypertext Preprocessor)
php (Hypertext Preprocessor)php (Hypertext Preprocessor)
php (Hypertext Preprocessor)
 
Scaling php applications with redis
Scaling php applications with redisScaling php applications with redis
Scaling php applications with redis
 
6 3 tier architecture php
6 3 tier architecture php6 3 tier architecture php
6 3 tier architecture php
 
PHP Basics and Demo HackU
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackU
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 

Mehr von saritasingh19866

Synapse india reviews on i phone and android os
Synapse india reviews on i phone and android osSynapse india reviews on i phone and android os
Synapse india reviews on i phone and android ossaritasingh19866
 
Synapse india reviews on share point development
Synapse india reviews on share point developmentSynapse india reviews on share point development
Synapse india reviews on share point developmentsaritasingh19866
 
Synapse india reviews on security for the share point developer
Synapse india reviews on security for the share point developerSynapse india reviews on security for the share point developer
Synapse india reviews on security for the share point developersaritasingh19866
 
Synapse india reviews on gui programming in .net
Synapse india reviews on gui programming in .netSynapse india reviews on gui programming in .net
Synapse india reviews on gui programming in .netsaritasingh19866
 
Synapse india reviews on mobile application development
Synapse india reviews on mobile application developmentSynapse india reviews on mobile application development
Synapse india reviews on mobile application developmentsaritasingh19866
 
Synapse india reviews on android application
Synapse india reviews on android applicationSynapse india reviews on android application
Synapse india reviews on android applicationsaritasingh19866
 
Synapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile applicationSynapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile applicationsaritasingh19866
 
Synapse india reviews on php and sql
Synapse india reviews on php and sqlSynapse india reviews on php and sql
Synapse india reviews on php and sqlsaritasingh19866
 
Synapseindia reviews on array php
Synapseindia reviews on array phpSynapseindia reviews on array php
Synapseindia reviews on array phpsaritasingh19866
 
Synapseindia reviews about Basic Networking
Synapseindia reviews about Basic NetworkingSynapseindia reviews about Basic Networking
Synapseindia reviews about Basic Networkingsaritasingh19866
 
Synapseindia revirews about networking
Synapseindia revirews about networkingSynapseindia revirews about networking
Synapseindia revirews about networkingsaritasingh19866
 
Synapse india reviews abot Networking Concept
Synapse india reviews abot Networking ConceptSynapse india reviews abot Networking Concept
Synapse india reviews abot Networking Conceptsaritasingh19866
 

Mehr von saritasingh19866 (14)

Synapse india reviews on i phone and android os
Synapse india reviews on i phone and android osSynapse india reviews on i phone and android os
Synapse india reviews on i phone and android os
 
Synapse india reviews on share point development
Synapse india reviews on share point developmentSynapse india reviews on share point development
Synapse india reviews on share point development
 
Synapse india reviews on security for the share point developer
Synapse india reviews on security for the share point developerSynapse india reviews on security for the share point developer
Synapse india reviews on security for the share point developer
 
Synapse india reviews on gui programming in .net
Synapse india reviews on gui programming in .netSynapse india reviews on gui programming in .net
Synapse india reviews on gui programming in .net
 
Synapse india reviews on mobile application development
Synapse india reviews on mobile application developmentSynapse india reviews on mobile application development
Synapse india reviews on mobile application development
 
Synapse india reviews on android application
Synapse india reviews on android applicationSynapse india reviews on android application
Synapse india reviews on android application
 
Synapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile applicationSynapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile application
 
Synapse india reviews on php and sql
Synapse india reviews on php and sqlSynapse india reviews on php and sql
Synapse india reviews on php and sql
 
Synapseindia reviews on array php
Synapseindia reviews on array phpSynapseindia reviews on array php
Synapseindia reviews on array php
 
Synapseindia reviews about Basic Networking
Synapseindia reviews about Basic NetworkingSynapseindia reviews about Basic Networking
Synapseindia reviews about Basic Networking
 
Synapseindia revirews about networking
Synapseindia revirews about networkingSynapseindia revirews about networking
Synapseindia revirews about networking
 
Synapseindia reviews
Synapseindia reviewsSynapseindia reviews
Synapseindia reviews
 
Synapse india reviews abot Networking Concept
Synapse india reviews abot Networking ConceptSynapse india reviews abot Networking Concept
Synapse india reviews abot Networking Concept
 
Synapse india reviews
Synapse india reviewsSynapse india reviews
Synapse india reviews
 

Kürzlich hochgeladen

Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 

Kürzlich hochgeladen (20)

Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 

Synapse india reviews on php website development

  • 1. SSyynnaappsseeiinnddiiaa RReevviieewwss DDeevveellooppiinngg WWeebb AApppplliiccaattiioonnss wwiitthh PPHHPP
  • 2. AAggeennddaa – Introduction – PHP Language Basics – Built-in Functions – PHP on Linux and Windows – Tricks and Tips – PHP 5 – Examples – Questions?
  • 3. IInnttrroodduuccttiioonn • What is PHP? – PHP stands for "PHP Hypertext Preprocessor” – An embedded scripting language for HTML like ASP or JSP – A language that combines elements of Perl, C, and Java
  • 4. IInnttrroodduuccttiioonn • History of PHP – Created by Rasmus Lerdorf in 1995 for tracking access to his resume – Originally a set of Perl scripts known as the “Personal Home Page” tools – Rewritten in C with database functionality – Added a forms interpreter and released as PHP/FI: includes Perl-like variables, and HTML embedded syntax
  • 5. IInnttrroodduuccttiioonn • History of PHP (cont.) – Rewritten again in and released as version 2.0 in November of 1997 – Estimated user base in 1997 is several thousand users and 50,000 web sites served – Rewritten again in late 1997 by Andi Gutmans and Zeev Suraski – More functionality added, database support, protocols and APIs
  • 6. IInnttrroodduuccttiioonn • History of PHP (cont.) – User base in 1998 estimated 10,000 users and 100,000 web sites installed – Version 3.0 was released in June 1998 as PHP – Estimated user base in tens of thousands and hundreds of thousands of web sites served
  • 7. IInnttrroodduuccttiioonn • History of PHP (cont.) – Rewritten again in 1997 by Andi Gutmans and Zeev 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
  • 8. IInnttrroodduuccttiioonn • History of PHP (cont.) – The core is rewritten in 1998 by Zeev and Andi and dubbed the “Zend Engine” – The engine is introduced in mid 1999 and is released with version 4.0 in May of 2000 – The estimated user base is hundreds of thousands of developers and several million of web sites served
  • 9. IInnttrroodduuccttiioonn • History of PHP (cont.) – Version 5.0 will include version 2.0 of the Zend Engine • New object model is more powerful and intuitive • Objects will no longer be passed by value; they now will be passed by reference • Increases performance and makes OOP more attractive
  • 10. IInnttrroodduuccttiioonn • Netcraft Statistics – 11,869,645 Domains, 1,316,288 IP Addresses
  • 11. IInnttrroodduuccttiioonn • Performance* – Zdnet Statistics • PHP pumped out about 47 pages/second • Microsoft ASP pumped out about 43 pages/second • Allaire ColdFusion pumped out about 29 pages/second • Sun Java JSP pumped out about 13 pages/second
  • 12. PPHHPP LLaanngguuaaggee BBaassiiccss • The Script Tags – All PHP code is contained in one of several script tags: • <? // Some code ?> • <?php // Some code here ?>
  • 13. PPHHPP LLaanngguuaaggee BBaassiiccss • The Script Tags (cont.) • <script language=“PHP"> // Some code here </script> – ASP-style tags • Introduced in 3.0; may be removed in the future • <% // Some code here %>
  • 14. PPHHPP LLaanngguuaaggee BBaassiiccss • The Script Tags (cont.) – “Echo” Tags – <table> <tr> <td>Name:</td><td><?= $name ?></td> </tr> <tr> <td>Address:</td><td><?= $address ?></td> </tr> </table>
  • 15. PPHHPP LLaanngguuaaggee BBaassiiccss • Hello World!: An Example – Like Perl, there is more than one way to do it • <?php echo “Hello World!”; ?> • <?php $greeting = “Hello World!” printf(“%s”, $greeting); php?>
  • 16. PPHHPP LLaanngguuaaggee BBaassiiccss • Hello World!: An Example (cont.) • <script language=“PHP”> $hello = “Hello”; $world = “World!”; print $hello . $world </script>
  • 17. PPHHPP LLaanngguuaaggee BBaassiiccss • Constants, Data Types and Variables – Constants define a string or numeric value – Constants do not begin with a dollar sign – Examples: • define(“COMPANY”, “Acme Enterprises”); • define(“YELLOW”, “#FFFF00”); • define(“PI”, 3.14); • define(“NL”, “<br>n”);
  • 18. PPHHPP LLaanngguuaaggee BBaassiiccss • Constants, Data Types and Variables – Using a constant • print(“Company name: “ . COMPANY . NL);
  • 19. PPHHPP LLaanngguuaaggee BBaassiiccss • Constants, Data Types and Variables – Data types • Integers, doubles and strings – isValid = true; // Boolean – 25 // Integer – 3.14 // Double – ‘Four’ // String – “Total value” // Another string
  • 20. PPHHPP LLaanngguuaaggee BBaassiiccss • Constants, Data Types and Variables – Data types • Strings and type conversion – $street = 123; – $street = $street . “ Main Street”; – $city = ‘Naperville’; $state = ‘IL’; – $address = $street; – $address = $address . NL . “$city, $state”; – $number = $address + 1; // $number equals 124
  • 21. PPHHPP LLaanngguuaaggee BBaassiiccss • Constants, Data Types and Variables – Data types • Arrays – Perl-like syntax • $arr = array("foo" => "bar", 12 => true); – same as • $arr[“foo”] = “bar”; • $arr[12] = true;
  • 22. PPHHPP LLaanngguuaaggee BBaassiiccss • Constants, Data Types and Variables • 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 ?>
  • 23. PPHHPP LLaanngguuaaggee BBaassiiccss • Constants, Data Types and Variables – Objects – Currently not much more advanced than than associative arrays Using constants – Before version 5.0, objects are passed by value • Slow • Functions can not easily change object variables
  • 24. PPHHPP LLaanngguuaaggee BBaassiiccss • Constants, Data Types and Variables – Operators – Contains all of the operators like in C and Perl (even the ternary) – Statements – if, if/elseif – Switch/case – for, while, and do/while loops – Include and require statements for code reuse
  • 25. BBuuiilltt--iinn FFuunnccttiioonnss • What comes In the box? – Array Manipulator Functions • sort, merge, push, pop, slice, splice, keys, count – CCVS: Interface to Red Hat’s credit system – COM functions: Interface to Windows COM objects – Date and Time Functions • getdate, mkdate, date, gettimeofday, localtime, strtotime, time
  • 26. BBuuiilltt--iinn FFuunnccttiioonnss • What comes In the box? – Directory Functions • Platform independent – Error Handling Functions • Recover from warnings and errors – Filesystem Functions • Access flat files • Check directory, link, and file status information • Copy, delete, and rename files
  • 27. BBuuiilltt--iinn FFuunnccttiioonnss • What comes In the box? – IMAP Functions • Manipulate mail boxes via the IMAP protocol – LDAP Functions • Works with most LDAP servers – Mail Functions • mail($recipient, $subject, $message)
  • 28. BBuuiilltt--iinn FFuunnccttiioonnss • What comes In the box? – Database Functions • dba: dbm-style abstraction layer • dBase • Frontbase • Informix • Ingres II • Interbase • mSQL
  • 29. BBuuiilltt--iinn FFuunnccttiioonnss • What comes In the box? – Database Functions (cont.) • MySQL • Oracle • PostgreSQL • SQL Server – MING • Macromedia Flash – PDF • Create/manipulate PDF files dynamically
  • 30. BBuuiilltt--iinn FFuunnccttiioonnss • What comes In the box? – POSIX Functions • Manipulate process information – Regular Expression Functions • Uses POSIX regex – Semaphore and Socket Functions • Available only on Unix – Session Management Functions
  • 31. PPHHPP oonn LLiinnuuxx aanndd WWiinnddoowwss • Code Portability – The obvious: don’t use Unix or Windows specific functions – Create a reusable module for file system differences, for example: – if( PHP_OS == "Linux" ) { $ConfigPath = "/var/www/conf"; $DataPath = "/var/www/data"; }
  • 32. PPHHPP oonn LLiinnuuxx aanndd WWiinnddoowwss • Code Portability – if( ereg("WIN", PHP_OS) ) { $ApachePath = “C:/Program Files/Apache Group/Apache”; $ConfigPath = ”$ApachePath/htdocs/conf"; $DataPath = "$ApachePath/htdocs/data"; } $ConfigFile = "$ConfigPath/paperwork.conf"; $CountryList = "$DataPath/countries.txt"; $StateAbbrList = "$DataPath/usstateabbrs.txt"; $StateNameList = "$DataPath/usstatenames.txt";
  • 33. TTrriicckkss aanndd TTiippss • Coding – Prototype your web pages first • Separate the design of the site from the coding – Turn repetitive code into functions • Makes for more maintainable and reusable code – Turn grunt code into functions • Database access, configuration file access
  • 34. TTrriicckkss aanndd TTiippss • Debugging – Feature: PHP is not a strongly typed language • Variables can be created anywhere in your code – Undocumented Feature: PHP is not a strongly typed language • Typos in variable names will cause stuff to happen
  • 35. TTrriicckkss aanndd TTiippss • Debugging – Use scripts to dump form and session variables • Write scripts to dump data to discover bad or missing data
  • 36. TTrriicckkss aanndd TTiippss • Development Tools – Color coding editors • vim, Emacs, Visual SlickEdit – IDEs • Windows – Macromedia Dreamweaver – Allaire Homesite – Zend’s PHPEdit • Linux – ???
  • 37. PPHHPP 55 • Release Date – ??? • Features – Complete objects • Objects with constructors • Abstract classes • Private, protected and abstract functions • Private, protected and constant variables • Namespaces • Exception handling with try/catch blocks