SlideShare a Scribd company logo
Enviar pesquisa
Carregar
Introduction to PHP
Denunciar
Compartilhar
Bradley Holt
Software Developer, Web Developer em Found Line
Seguir
•
105 gostaram
•
42,607 visualizações
1
de
77
Introduction to PHP
•
105 gostaram
•
42,607 visualizações
Denunciar
Compartilhar
Baixar agora
Baixar para ler offline
Tecnologia
An introduction to the PHP programming language.
Leia mais
Bradley Holt
Software Developer, Web Developer em Found Line
Seguir
Recomendados
PHP Workshop Notes por
PHP Workshop Notes
Pamela Fox
5.9K visualizações
•
29 slides
Introduction to PHP por
Introduction to PHP
Collaboration Technologies
300 visualizações
•
16 slides
Introduction to PHP - Basics of PHP por
Introduction to PHP - Basics of PHP
wahidullah mudaser
301 visualizações
•
51 slides
PHP POWERPOINT SLIDES por
PHP POWERPOINT SLIDES
Ismail Mukiibi
3.9K visualizações
•
19 slides
Php mysql por
Php mysql
Abu Bakar
261 visualizações
•
40 slides
Php.ppt por
Php.ppt
Nidhi mishra
18.5K visualizações
•
59 slides
Mais conteúdo relacionado
Mais procurados
PHP por
PHP
Steve Fort
6.2K visualizações
•
22 slides
Php(report) por
Php(report)
Yhannah
2K visualizações
•
48 slides
PHP FUNCTIONS por
PHP FUNCTIONS
Zeeshan Ahmed
5.8K visualizações
•
75 slides
Php por
Php
Shyam Khant
5K visualizações
•
103 slides
PHP por
PHP
sometech
5.2K visualizações
•
66 slides
Introduction to php por
Introduction to php
Taha Malampatti
37.9K visualizações
•
32 slides
Mais procurados
(20)
PHP por Steve Fort
PHP
Steve Fort
•
6.2K visualizações
Php(report) por Yhannah
Php(report)
Yhannah
•
2K visualizações
PHP FUNCTIONS por Zeeshan Ahmed
PHP FUNCTIONS
Zeeshan Ahmed
•
5.8K visualizações
Php por Shyam Khant
Php
Shyam Khant
•
5K visualizações
PHP por sometech
PHP
sometech
•
5.2K visualizações
Introduction to php por Taha Malampatti
Introduction to php
Taha Malampatti
•
37.9K visualizações
Php mysql ppt por Karmatechnologies Pvt. Ltd.
Php mysql ppt
Karmatechnologies Pvt. Ltd.
•
70.1K visualizações
PHP NOTES FOR BEGGINERS por Aminiel Michael
PHP NOTES FOR BEGGINERS
Aminiel Michael
•
1.2K visualizações
Php mysql por Shehrevar Davierwala
Php mysql
Shehrevar Davierwala
•
3.8K visualizações
07 Introduction to PHP #burningkeyboards por Denis Ristic
07 Introduction to PHP #burningkeyboards
Denis Ristic
•
342 visualizações
Short Intro to PHP and MySQL por Jussi Pohjolainen
Short Intro to PHP and MySQL
Jussi Pohjolainen
•
3.4K visualizações
PHP complete reference with database concepts for beginners por Mohammed Mushtaq Ahmed
PHP complete reference with database concepts for beginners
Mohammed Mushtaq Ahmed
•
6K visualizações
Beginners PHP Tutorial por alexjones89
Beginners PHP Tutorial
alexjones89
•
18.2K visualizações
Introduction to php web programming - get and post por baabtra.com - No. 1 supplier of quality freshers
Introduction to php web programming - get and post
baabtra.com - No. 1 supplier of quality freshers
•
1.4K visualizações
Intermediate PHP por Bradley Holt
Intermediate PHP
Bradley Holt
•
2.5K visualizações
Php Lecture Notes por Santhiya Grace
Php Lecture Notes
Santhiya Grace
•
4.7K visualizações
Class 6 - PHP Web Programming por Ahmed Swilam
Class 6 - PHP Web Programming
Ahmed Swilam
•
1.8K visualizações
Introduction To PHP por Shweta A
Introduction To PHP
Shweta A
•
608 visualizações
Introduction to php por Anjan Banda
Introduction to php
Anjan Banda
•
1.5K visualizações
Loops PHP 04 por Spy Seat
Loops PHP 04
Spy Seat
•
4.5K visualizações
Similar a Introduction to PHP
Introduction to PHP Lecture 1 por
Introduction to PHP Lecture 1
Ajay Khatri
150 visualizações
•
128 slides
GettingStartedWithPHP por
GettingStartedWithPHP
Nat Weerawan
818 visualizações
•
21 slides
Php mysql por
Php mysql
Alebachew Zewdu
7.8K visualizações
•
40 slides
[PL] Jak nie zostać "programistą" PHP? por
[PL] Jak nie zostać "programistą" PHP?
Radek Benkel
3K visualizações
•
103 slides
slidesharenew1 por
slidesharenew1
truptitasol
2.5K visualizações
•
40 slides
My cool new Slideshow! por
My cool new Slideshow!
omprakash_bagrao_prdxn
2.6K visualizações
•
40 slides
Similar a Introduction to PHP
(20)
Introduction to PHP Lecture 1 por Ajay Khatri
Introduction to PHP Lecture 1
Ajay Khatri
•
150 visualizações
GettingStartedWithPHP por Nat Weerawan
GettingStartedWithPHP
Nat Weerawan
•
818 visualizações
Php mysql por Alebachew Zewdu
Php mysql
Alebachew Zewdu
•
7.8K visualizações
[PL] Jak nie zostać "programistą" PHP? por Radek Benkel
[PL] Jak nie zostać "programistą" PHP?
Radek Benkel
•
3K visualizações
slidesharenew1 por truptitasol
slidesharenew1
truptitasol
•
2.5K visualizações
My cool new Slideshow! por omprakash_bagrao_prdxn
My cool new Slideshow!
omprakash_bagrao_prdxn
•
2.6K visualizações
What's new with PHP7 por SWIFTotter Solutions
What's new with PHP7
SWIFTotter Solutions
•
872 visualizações
Web 8 | Introduction to PHP por Mohammad Imam Hossain
Web 8 | Introduction to PHP
Mohammad Imam Hossain
•
321 visualizações
Web Technology_10.ppt por Aftabali702240
Web Technology_10.ppt
Aftabali702240
•
4 visualizações
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016 por Codemotion
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
Codemotion
•
445 visualizações
The new features of PHP 7 por Zend by Rogue Wave Software
The new features of PHP 7
Zend by Rogue Wave Software
•
856 visualizações
Php Tutorials for Beginners por Vineet Kumar Saini
Php Tutorials for Beginners
Vineet Kumar Saini
•
5.4K visualizações
php AND MYSQL _ppt.pdf por SVN Polytechnic Kalan Sultanpur UP
php AND MYSQL _ppt.pdf
SVN Polytechnic Kalan Sultanpur UP
•
12 visualizações
Php hacku por Tom Praison Praison
Php hacku
Tom Praison Praison
•
482 visualizações
Mastering Namespaces in PHP por Nick Belhomme
Mastering Namespaces in PHP
Nick Belhomme
•
16.7K visualizações
関西PHP勉強会 php5.4つまみぐい por Hisateru Tanaka
関西PHP勉強会 php5.4つまみぐい
Hisateru Tanaka
•
2.6K visualizações
2014 database - course 2 - php por Hung-yu Lin
2014 database - course 2 - php
Hung-yu Lin
•
2.8K visualizações
Php with my sql por husnara mohammad
Php with my sql
husnara mohammad
•
207 visualizações
Introducation to php for beginners por musrath mohammad
Introducation to php for beginners
musrath mohammad
•
209 visualizações
PHP: The easiest language to learn. por Binny V A
PHP: The easiest language to learn.
Binny V A
•
5.2K visualizações
Mais de Bradley Holt
Domain-Driven Design at ZendCon 2012 por
Domain-Driven Design at ZendCon 2012
Bradley Holt
1.5K visualizações
•
79 slides
Domain-Driven Design por
Domain-Driven Design
Bradley Holt
1.9K visualizações
•
60 slides
Entity Relationships in a Document Database at CouchConf Boston por
Entity Relationships in a Document Database at CouchConf Boston
Bradley Holt
3.2K visualizações
•
77 slides
CouchConf NYC CouchApps por
CouchConf NYC CouchApps
Bradley Holt
2.7K visualizações
•
181 slides
ZendCon 2011 UnCon Domain-Driven Design por
ZendCon 2011 UnCon Domain-Driven Design
Bradley Holt
2.6K visualizações
•
63 slides
ZendCon 2011 Learning CouchDB por
ZendCon 2011 Learning CouchDB
Bradley Holt
5.4K visualizações
•
402 slides
Mais de Bradley Holt
(15)
Domain-Driven Design at ZendCon 2012 por Bradley Holt
Domain-Driven Design at ZendCon 2012
Bradley Holt
•
1.5K visualizações
Domain-Driven Design por Bradley Holt
Domain-Driven Design
Bradley Holt
•
1.9K visualizações
Entity Relationships in a Document Database at CouchConf Boston por Bradley Holt
Entity Relationships in a Document Database at CouchConf Boston
Bradley Holt
•
3.2K visualizações
CouchConf NYC CouchApps por Bradley Holt
CouchConf NYC CouchApps
Bradley Holt
•
2.7K visualizações
ZendCon 2011 UnCon Domain-Driven Design por Bradley Holt
ZendCon 2011 UnCon Domain-Driven Design
Bradley Holt
•
2.6K visualizações
ZendCon 2011 Learning CouchDB por Bradley Holt
ZendCon 2011 Learning CouchDB
Bradley Holt
•
5.4K visualizações
jQuery Conference Boston 2011 CouchApps por Bradley Holt
jQuery Conference Boston 2011 CouchApps
Bradley Holt
•
3.9K visualizações
OSCON 2011 CouchApps por Bradley Holt
OSCON 2011 CouchApps
Bradley Holt
•
5.4K visualizações
OSCON 2011 Learning CouchDB por Bradley Holt
OSCON 2011 Learning CouchDB
Bradley Holt
•
3.9K visualizações
Load Balancing with Apache por Bradley Holt
Load Balancing with Apache
Bradley Holt
•
26.3K visualizações
CouchDB at New York PHP por Bradley Holt
CouchDB at New York PHP
Bradley Holt
•
16.3K visualizações
New Features in PHP 5.3 por Bradley Holt
New Features in PHP 5.3
Bradley Holt
•
61.3K visualizações
Resource-Oriented Web Services por Bradley Holt
Resource-Oriented Web Services
Bradley Holt
•
4.8K visualizações
Zend Framework Quick Start Walkthrough por Bradley Holt
Zend Framework Quick Start Walkthrough
Bradley Holt
•
2.3K visualizações
Burlington, VT PHP Users Group Subversion Presentation por Bradley Holt
Burlington, VT PHP Users Group Subversion Presentation
Bradley Holt
•
2.3K visualizações
Último
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... por
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue
34 visualizações
•
17 slides
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue por
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue
46 visualizações
•
15 slides
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... por
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue
77 visualizações
•
12 slides
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... por
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue
48 visualizações
•
17 slides
Data Integrity for Banking and Financial Services por
Data Integrity for Banking and Financial Services
Precisely
56 visualizações
•
26 slides
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... por
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
The Digital Insurer
31 visualizações
•
52 slides
Último
(20)
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... por ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue
•
34 visualizações
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue por ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue
•
46 visualizações
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... por ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue
•
77 visualizações
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... por ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue
•
48 visualizações
Data Integrity for Banking and Financial Services por Precisely
Data Integrity for Banking and Financial Services
Precisely
•
56 visualizações
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... por The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
The Digital Insurer
•
31 visualizações
Future of AR - Facebook Presentation por Rob McCarty
Future of AR - Facebook Presentation
Rob McCarty
•
46 visualizações
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... por ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue
•
46 visualizações
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... por James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson
•
133 visualizações
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates por ShapeBlue
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates
ShapeBlue
•
119 visualizações
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... por ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue
•
63 visualizações
20231123_Camunda Meetup Vienna.pdf por Phactum Softwareentwicklung GmbH
20231123_Camunda Meetup Vienna.pdf
Phactum Softwareentwicklung GmbH
•
46 visualizações
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT por ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue
•
91 visualizações
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue por ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue
•
50 visualizações
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... por ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue
•
57 visualizações
Uni Systems for Power Platform.pptx por Uni Systems S.M.S.A.
Uni Systems for Power Platform.pptx
Uni Systems S.M.S.A.
•
58 visualizações
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... por ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue
•
82 visualizações
Igniting Next Level Productivity with AI-Infused Data Integration Workflows por Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software
•
344 visualizações
Digital Personal Data Protection (DPDP) Practical Approach For CISOs por Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash
•
81 visualizações
"Surviving highload with Node.js", Andrii Shumada por Fwdays
"Surviving highload with Node.js", Andrii Shumada
Fwdays
•
40 visualizações
Introduction to PHP
1.
Introduction to PHP
Bradley Holt (http://bradley-holt.com/) & Matthew Weier O’Phinney (http:/ /weierophinney.net/matthew/) Feedback: http://joind.in/1976
2.
What is PHP? Loosely
typed scripting language Interpreted at runtime (use an opcode cache) Commonly used to build web applications
3.
Who uses PHP? Yahoo! Facebook 20+
million other domain names
4.
Brief History
5.
Personal Home Page
/ Forms Interpreter Created by Rasmus Lerdorf PHP/FI 1.0 released in 1995 PHP/FI 2.0 released in 1997
6.
PHP: Hypertext
Preprocessor Created by Andi Gutmans and Zeev Suraski PHP 3.0 released in 1998 PHP 4.4 released in 2005
7.
PHP 5 New object
model PHP 5.0 released in 2004 PHP 5.3 released in 2009
8.
Syntax
9.
Hello World <?php // hello.php echo
'Hello, VT Code Camp.'; ?>
10.
Variable Assignment <?php $hello =
'Hello, VT Code Camp.'; echo $hello;
11.
Comments
12.
One Line Comments <?php //
A one line comment # Another one line comment
13.
Multi-Line Comments <?php /* A multi-line
comment */
14.
DocBlock Comments <?php /** *
This function does nothing * * @param string $bar * @return void */ function foo($bar) {}
15.
Primitive Data Types <?php $isPhpProgrammer
= true; // boolean $howOldIsPhp = 15; // integer $pi = 3.14; // float $event = 'VT Code Camp'; // string
16.
Conditionals
17.
If <?php if (true) {
echo 'Yes'; }
18.
If-Then-Else <?php if (false) {
echo 'No'; } else { echo 'Yes'; }
19.
If-Then-Else-If <?php if (false) {
echo 'No'; } elseif (false) { echo 'No'; } else { echo 'Yes'; }
20.
Switch <?php switch ('PHP') {
case 'Ruby': echo 'No'; break; case 'PHP': echo 'Yes'; break; }
21.
Operators
22.
Arithmetic <?php $a = 10; $b
= $a + 1; // 11 $c = $a - 1; // 9 $d = $a * 5; // 50 $e = $a / 2; // 5 $f = $a % 3; // 1
23.
String Concatenation <?php $myString =
'foo' . 'bar'; // foobar $myString .= 'baz'; // foobarbaz
24.
Comparison
25.
Equivalence <?php if (2 ==
3) { echo 'No'; } if (3 == '3') { echo 'Yes'; } if (2 != 3) { echo 'Yes'; }
26.
Identity <?php if (3 ===
'3') { echo 'No'; } if (3 === 3) { echo 'Yes'; } if (3 !== 4) { echo 'Yes'; }
27.
Logical Operators <?php // NOT if
(!true) { echo 'No'; } // AND if (true && false) { echo 'No'; } // OR if (true || false) { echo 'No'; }
28.
Strings & Interpolation
29.
Literal Single Quotes <?php $x
= 2; echo 'I ate $x cookies.'; // I ate $x cookies.
30.
Double Quotes <?php $x =
2; echo "I ate $x cookies."; // I ate 2 cookies.
31.
Literal Double Quotes <?php $x
= 2; echo "I ate $x cookies."; // I ate $x cookies.
32.
Curly Brace
Double Quotes <?php $x = 2; echo "I ate {$x} cookies."; // I ate 2 cookies.
33.
Constants
34.
Defining <?php define('HELLO', 'Hello, Code
Camp'); echo HELLO; // Hello, Code Camp
35.
As of PHP
5.3 <?php const HELLO = 'Hello, Code Camp'; echo HELLO; // Hello, Code Camp
36.
Arrays
37.
Enumerative
38.
Automatic Indexing <?php $foo[] =
'bar'; // [0] => bar $foo[] = 'baz'; // [1] => baz
39.
Explicit Indexing <?php $foo[0] =
'bar'; // [0] => bar $foo[1] = 'baz'; // [1] => baz
40.
Array Construct with
Automatic Indexing <?php $foo = array( 'bar', // [0] => bar 'baz', // [1] => baz );
41.
Array Construct with
Explicit Indexing <?php $foo = array( 0 => 'bar', // [0] => bar 1 => 'baz', // [1] => baz );
42.
Array Construct with
Arbitrary Indexing <?php $foo = array( 1 => 'bar', // [1] => bar 2 => 'baz', // [2] => baz );
43.
Associative
44.
Explicit Indexing <?php $foo['a'] =
'bar'; // [a] => bar $foo['b'] = 'baz'; // [b] => baz
45.
Array Construct <?php $foo =
array( 'a' => 'bar', // [a] => bar 'b' => 'baz', // [b] => baz );
46.
Iterators
47.
While <?php $x = 0; while
($x < 5) { echo '.'; $x++; }
48.
For <?php for ($x =
0; $x < 5; $x++) { echo '.'; }
49.
Foreach <?php $x = array(0,
1, 2, 3, 4); foreach ($x as $y) { echo $y; }
50.
Foreach Key/Value Pairs <?php $talks
= array( 'php' => 'Intro to PHP', 'ruby' => 'Intro to Ruby', ); foreach ($talks as $id => $name) { echo "$name is talk ID $id."; echo PHP_EOL; }
51.
Functions
52.
Built-in <?php echo strlen('Hello'); //
5 echo trim(' Hello '); // Hello echo count(array(0, 1, 2, 3)); // 4 echo uniqid(); // 4c8a6660519d5 echo mt_rand(0, 9); // 3 echo serialize(42); // i:42; echo json_encode(array('a' => 'b')); // {"a":"b"}
53.
User-Defined <?php function add($x, $y) {
return $x + $y; } echo add(2, 4); // 6
54.
Anonymous Functions / Closures
(since PHP 5.3)
55.
Variable Assignment <?php $sayHi =
function () { return 'Hi'; }; echo $sayHi(); // Hi
56.
Callbacks <?php $values = array(3,
7, 2); usort($values, function ($a, $b) { if ($a == $b) { return 0; } return ($a < $b) ? -1 : 1; }); /* [0] => 2 [1] => 3 [2] => 7 */
57.
Classes & Objects
58.
Class Declaration <?php class Car { }
59.
Property Declaration <?php class Car {
private $_hasSunroof = true; }
60.
Method Declaration <?php class Car {
public function hasSunroof() { return $this->_hasSunroof; } }
61.
Class Constants <?php class Car {
const ENGINE_V4 = 'V4'; const ENGINE_V6 = 'V6'; const ENGINE_V8 = 'V8'; } echo Car::ENGINE_V6; // V6
62.
Object Instantiation
& Member Access <?php $myCar = new Car(); if ($myCar->hasSunroof()) { echo 'Yay!'; }
63.
Class Inheritance <?php class Chevy
extends Car { }
64.
Interfaces <?php interface Vehicle {
public function hasSunroof(); }
65.
Implementing Interfaces <?php class Car
implements Vehicle { public function hasSunroof() { return $this->_hasSunroof; } }
66.
Member Visibility
67.
Public Default visibility Visible everywhere
68.
Protected Visible to child
classes Visible to the object itself Visible to other objects of the same type
69.
Private Visible to the
object itself Visible within the defining class declaration
70.
Tools
71.
IDEs Eclipse (PDT, Zend
Studio, Aptana) NetBeans PHPStorm Emacs Vim Many more…
72.
Frameworks Zend Framework Symfony CodeIgniter Agavi CakePHP Many more…
73.
PEAR PHP Extension and
Application Repository Package manager PECL (PHP Extension Community Library)
74.
Miscellaneous Tools PHPUnit phpDocumentor Phing PHP CodeSniffer PHP
Mess Detector phpUnderControl
75.
Example PHP Scripts http://github.com/bradley-holt/introduction-to-php
76.
Questions?
77.
Thank You
Bradley Holt (http://bradley-holt.com/) & Matthew Weier O’Phinney (http:/ /weierophinney.net/matthew/) Feedback: http://joind.in/1976