SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
INTRODUCTION TO PHP
               SDPHP
Twitter: @sdphp | www.sdphp.org (coming soon)
  MeetUp: www.meetup.com/SanDiegoPHP/
Who we are:
Presenters
    John Congdon - Senior Web Developer at Networx Online
        Twitter: @johncongdon
        Email: john@sdphp.org
        LinkedIn: http://www.linkedin.com/in/johncongdon

    Eric Van Johnson - Systems Architect at AMCO International Education Services, Inc.
         Twitter: @shocm
         Email: eric@sdphp.org
         LinkedIn: http://www.linkedin.com/in/vanjohnson

San Diego PHP User Group
    San Diego PHP Meetups => http://www.meetup.com/SanDiegoPHP/
    Facebook => https://www.facebook.com/groups/SanDiegoPUG/
    IRC => freenode.net #sdphp
    Twitter => @sdphp
A quick history
Created in 1994 by Rasmus Lerdorf and was a set of simple Common Gateway
Interface (CGI) binaries written in the C programming language that he used for
tracking visits to his online resume, he named the suite of scripts "Personal Home
Page Tools"



In 1998 PHP 3.0 is announced and is a complete rewrite of the platform. By this
time Andi Gutmans and Zeev Suraski of Tel Aviv, Israel join Rasmus to
collaborate on the new implementation. This is also when PHP got it's official
name PHP: Hypertext Preprocessor, which is a recursive acronym.
A quick history (cont.)
PHP 4 is released in 2000 sporting a new engine dubbed 'Zend Engine'
(comprised of the first names of Zeev and Andi). PHP 4.0 introduces a wide range
of additional new features. In addition to the highly improved performance it also
included key features such as support for many more web servers, HTTP
sessions, output buffering, more secure ways of handling user input and several
new language constructs.
There are companies that still use PHP 4.x in their production environment. (And
we like to make fun of them)



PHP 5 released in 2004 powered by Zend Engine II with a new object mode.
Current stable version of PHP is 5.4.8. Several new features come packed in the
current releases of PHP such as Namespace support, Native JSON support, and
security improvements.
Who uses PHP?


 EVERYONE!
Google / Yahoo / Facebook / Sony /
 Bank of America / NYSE / AT&T /
       Blah Blah Blah Blah
OPEN & CLOSING TAGS
VARIABLES
A Variable, as the name suggests, can have its
value change during the execution of a script.
CONSTANTS
A constant, once defined, cannot be changed
or unset. Traditionally constants are uppercase.
INCLUDE FILE.. ONCE




      Useful for class and function loading
INCLUDING MISSING SCRIPTS
TYPES IN PHP
 ●   Strings
 ●   Integers
 ●   Floats
 ●   Arrays
 ●   and many more...
STRINGS



          What's the difference?
INTEGERS
ARRAYS




         Arrays are zero-based.



    Arrays can be of mixed types
ASSOCIATIVE ARRAYS
      Key => Value pairs of data
FLOW CONTROL
FOR LOOPS
FOREACH LOOPS
FOREACH LOOPS
WHILE LOOPS
DO WHILE
SWITCH CASES
CONTINUE AND BREAK




           ●  for
           ● foreach

           ● while
           ● do ... while
           ● switch
ALTERNATE SYNTAXES
ALTERNATE SYNTAX: IF
ALTERNATE SYNTAX: FOR
ALTERNATE SYNTAX: FOREACH




ALTERNATE SYNTAX: WHILE
FUNCTIONS
CLASSES
MAGIC: GET
MAGIC: GET
MAGIC: SET
STATIC
CLASS CONSTANTS
CLASS VISIBILITY
METHOD OVERLOADING
DATABASE ACCESS
Why you should be using PDO (PHP Data Objects)
● Cross Database Driver support
● Prepared Statements
● Proper bindings
● and lots lots more
MODELS, VIEWS, CONTROLLERS
● Code Separation
● Reusability
● Ease Refactoring
MODELS



    ● a model represents your data
    ● Logical container for
      ○ Database calls
      ○ API Access
    ● Models usually represent
      ○ Tables in a database
      ○ a file or collection of files on a hard drive
      ○ Documents stored in Mongo
      ○ Any other data containers you need to define
VIEWS
VIEW.. MODELS?
CONTROLLERS
Other Cool Things PHP Can Do That
Not a Lot of People Know.
● PHP CLI - PHP files don't have to be web
  pages. PHP is a very powerful language that
  can be used from the command line to
  perform a wide range of system task.

● As of PHP 5.4.0, the CLI SAPI provides a
  built-in web server.
    $ cd ~/public_html
    $ php -S localhost:8000
Other Cool Things (cont)
● As of PHP 5.1.0, the CLI SAPI provides an
  interactive shell using the -a option.
PHP Tools
● Text Editor (Notepad / Notepad ++)
● Vim
IDEs
● Eclipse (Open Source)
  ○ PDT Plugin (Open Source)
  ○ Aptana PHP (Open Source)
    ■ Aptana Studio Pro (Commercial)
  ○ Zend Studio (Commercial)
● NetBeans (Open Source)
● PhpStorm (Commercial)
● NuSphere PhpED (Commercial)
What Do Employers Look For?
● A college degree, so you are on the right track
● Code examples. Will typically check for a Github
   account. Make sure you have some publicly contributed
   code. Open Source Projects are good place to do this.
● Certifications
   ○ Zend PHP Certifications http://www.zend.
     com/services/certification/
   ○ MySQL Developer http://education.oracle.
     com/pls/web_prod-plq-dad/db_pages.getpage?
     page_id=458&get_params=p_track_id:MDEV
How Can You Improve Your Skills?
● SD PHP User Group
● Conferences
  ○ Code Works (Los Angeles Dec 12)
    ■ http://codeworks.phparch.com/los-angeles/
  ○ PHP Tek (Chicago every year, usually May)
    ■ 2013 has not been announced yet
    ■ http://tek.phparch.com/
  ○ ZendCon (October)
    ■ http://zendcon.com/
● Contribute to Open Source
● Practice, practice, practice
● Learn to know what you don't know
What Else Do Employers Look For?

            PASSION
Development is a very personal thing.
A developer needs to be creative,
logical, focused, and enjoy what they
are doing. Get involved with the PHP
community. Forums, StackOverflow,
Local User Groups like SDPHP ;-)
Resources
Local
    San Diego PHP Meetups => http://www.meetup.com/SanDiegoPHP/
    Facebook => https://www.facebook.com/groups/SanDiegoPUG/
    IRC => freenode.net #sdphp
    Twitter => @sdphp / @shocm / @johncongdon / @williammanley

Others
    Zend.com
    StackOverflow => http://stackoverflow.com/questions/tagged/php
    php|Arch => http://www.phparch.com/
Credits
Original Presentation by
    William Cahill-Manley - Application Developer for Submodal
         Twitter: @williammanley
       Email: william@sdphp.org

Today's Presenters
   John Congdon - Senior Web Developer at Networx Online
        Twitter: @johncongdon
        Email: john@sdphp.org
        LinkedIn: http://www.linkedin.com/in/johncongdon

     Eric Van Johnson - Systems Architect at AMCO International Education Services, Inc.
          Twitter: @shocm
          Email: eric@sdphp.org
          LinkedIn: http://www.linkedin.com/in/vanjohnson

Contenu connexe

Tendances

Experience protocol buffer on android
Experience protocol buffer on androidExperience protocol buffer on android
Experience protocol buffer on androidRichard Chang
 
Lately in php - 2019 May 4
Lately in php - 2019 May 4Lately in php - 2019 May 4
Lately in php - 2019 May 4Eric Poe
 
Translating software with SDL Passolo?
Translating software with SDL Passolo?Translating software with SDL Passolo?
Translating software with SDL Passolo?Loctimize GmbH
 
WP 4.7 & React — A perfect marriage?
WP 4.7 & React — A perfect marriage?WP 4.7 & React — A perfect marriage?
WP 4.7 & React — A perfect marriage?Plastical
 
Introduction to SDL Passolo
Introduction to SDL PassoloIntroduction to SDL Passolo
Introduction to SDL PassoloAnnie Markova
 
Translating software with SDL Passolo
Translating software with SDL PassoloTranslating software with SDL Passolo
Translating software with SDL PassoloSDL Trados
 
All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014Gábor Hojtsy
 
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...Aniruddha Chakrabarti
 
Taking PHP to the next level
Taking PHP to the next levelTaking PHP to the next level
Taking PHP to the next levelDavid Coallier
 
Taking PHP To the next level
Taking PHP To the next levelTaking PHP To the next level
Taking PHP To the next levelDavid Coallier
 
Dmytro Dziubenko "Developer's toolchain"
Dmytro Dziubenko "Developer's toolchain"Dmytro Dziubenko "Developer's toolchain"
Dmytro Dziubenko "Developer's toolchain"Fwdays
 
A First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageA First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageGanesh Samarthyam
 
really really really awesome php application with bdd behat and iterfaces
really really really awesome php application with bdd behat and iterfacesreally really really awesome php application with bdd behat and iterfaces
really really really awesome php application with bdd behat and iterfacesGiulio De Donato
 
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
[INNOVATUBE] Tech Talk #3: Golang - Takaaki MizunoNexus FrontierTech
 
Coding with golang
Coding with golangCoding with golang
Coding with golangHannahMoss14
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go langAmal Mohan N
 

Tendances (20)

Experience protocol buffer on android
Experience protocol buffer on androidExperience protocol buffer on android
Experience protocol buffer on android
 
Lately in php - 2019 May 4
Lately in php - 2019 May 4Lately in php - 2019 May 4
Lately in php - 2019 May 4
 
Introduction to Go-Lang
Introduction to Go-LangIntroduction to Go-Lang
Introduction to Go-Lang
 
Multilingual Drupal
Multilingual DrupalMultilingual Drupal
Multilingual Drupal
 
Translating software with SDL Passolo?
Translating software with SDL Passolo?Translating software with SDL Passolo?
Translating software with SDL Passolo?
 
WP 4.7 & React — A perfect marriage?
WP 4.7 & React — A perfect marriage?WP 4.7 & React — A perfect marriage?
WP 4.7 & React — A perfect marriage?
 
Introduction to SDL Passolo
Introduction to SDL PassoloIntroduction to SDL Passolo
Introduction to SDL Passolo
 
Translating software with SDL Passolo
Translating software with SDL PassoloTranslating software with SDL Passolo
Translating software with SDL Passolo
 
All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014
 
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
 
Taking PHP to the next level
Taking PHP to the next levelTaking PHP to the next level
Taking PHP to the next level
 
Taking PHP To the next level
Taking PHP To the next levelTaking PHP To the next level
Taking PHP To the next level
 
Dmytro Dziubenko "Developer's toolchain"
Dmytro Dziubenko "Developer's toolchain"Dmytro Dziubenko "Developer's toolchain"
Dmytro Dziubenko "Developer's toolchain"
 
A First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageA First Look at Google's Go Programming Language
A First Look at Google's Go Programming Language
 
Php test fest
Php test festPhp test fest
Php test fest
 
really really really awesome php application with bdd behat and iterfaces
really really really awesome php application with bdd behat and iterfacesreally really really awesome php application with bdd behat and iterfaces
really really really awesome php application with bdd behat and iterfaces
 
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 
Coding with golang
Coding with golangCoding with golang
Coding with golang
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
Go Lang
Go LangGo Lang
Go Lang
 

En vedette

Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHPprabhatjon
 
An introduction to PHP 5.4
An introduction to PHP 5.4An introduction to PHP 5.4
An introduction to PHP 5.4Giovanni Derks
 
Introduction To Php For Wit2009
Introduction To Php For Wit2009Introduction To Php For Wit2009
Introduction To Php For Wit2009cwarren
 
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014David Yell
 
Introduction to PHP OOP
Introduction to PHP OOPIntroduction to PHP OOP
Introduction to PHP OOPfakhrul hasan
 
Class 2 - Introduction to PHP
Class 2 - Introduction to PHPClass 2 - Introduction to PHP
Class 2 - Introduction to PHPAhmed Swilam
 
Introduction Apache Solr & PHP
Introduction Apache Solr & PHPIntroduction Apache Solr & PHP
Introduction Apache Solr & PHPHiraq Citra M
 
Building your own search engine with Apache Solr
Building your own search engine with Apache SolrBuilding your own search engine with Apache Solr
Building your own search engine with Apache SolrBiogeeks
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisIan Macali
 

En vedette (20)

Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Songs
SongsSongs
Songs
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Introduction in php part 2
Introduction in php part 2Introduction in php part 2
Introduction in php part 2
 
PHP - Introduction to PHP Forms
PHP - Introduction to PHP FormsPHP - Introduction to PHP Forms
PHP - Introduction to PHP Forms
 
An introduction to PHP 5.4
An introduction to PHP 5.4An introduction to PHP 5.4
An introduction to PHP 5.4
 
Introduction To Php For Wit2009
Introduction To Php For Wit2009Introduction To Php For Wit2009
Introduction To Php For Wit2009
 
PHP - Introduction to PHP
PHP -  Introduction to PHPPHP -  Introduction to PHP
PHP - Introduction to PHP
 
PHP - Introduction to PHP MySQL Joins and SQL Functions
PHP -  Introduction to PHP MySQL Joins and SQL FunctionsPHP -  Introduction to PHP MySQL Joins and SQL Functions
PHP - Introduction to PHP MySQL Joins and SQL Functions
 
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Introduction to PHP OOP
Introduction to PHP OOPIntroduction to PHP OOP
Introduction to PHP OOP
 
01 Php Introduction
01 Php Introduction01 Php Introduction
01 Php Introduction
 
Introduction to php web programming - sessions and cookies
Introduction to php   web programming - sessions and cookiesIntroduction to php   web programming - sessions and cookies
Introduction to php web programming - sessions and cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Class 2 - Introduction to PHP
Class 2 - Introduction to PHPClass 2 - Introduction to PHP
Class 2 - Introduction to PHP
 
Introduction Apache Solr & PHP
Introduction Apache Solr & PHPIntroduction Apache Solr & PHP
Introduction Apache Solr & PHP
 
Building your own search engine with Apache Solr
Building your own search engine with Apache SolrBuilding your own search engine with Apache Solr
Building your own search engine with Apache Solr
 
PHP - Introduction to PHP Cookies and Sessions
PHP - Introduction to PHP Cookies and SessionsPHP - Introduction to PHP Cookies and Sessions
PHP - Introduction to PHP Cookies and Sessions
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with this
 

Similaire à Introduction to PHP (SDPHP)

Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHPEric Johnson
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1ADARSH BHATT
 
Top 8 Powerful Tools Developers Use for Laravel Web Development.pdf
Top 8 Powerful Tools Developers Use for Laravel Web Development.pdfTop 8 Powerful Tools Developers Use for Laravel Web Development.pdf
Top 8 Powerful Tools Developers Use for Laravel Web Development.pdfMoonTechnolabsPvtLtd
 
Federico Feroldi: PHP in Yahoo!
Federico Feroldi: PHP in Yahoo!Federico Feroldi: PHP in Yahoo!
Federico Feroldi: PHP in Yahoo!Francesco Fullone
 
Federico Feroldi Php In Yahoo
Federico Feroldi Php In YahooFederico Feroldi Php In Yahoo
Federico Feroldi Php In YahooFederico Feroldi
 
Integrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIntegrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIvo Jansch
 
Node.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdfNode.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdfMindfire LLC
 
PHP, Java EE & .NET Comparison
PHP, Java EE & .NET ComparisonPHP, Java EE & .NET Comparison
PHP, Java EE & .NET ComparisonHaim Michael
 
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?Wong Hoi Sing Edison
 
Unleash your Symfony projects with eZ Platform
Unleash your Symfony projects with eZ PlatformUnleash your Symfony projects with eZ Platform
Unleash your Symfony projects with eZ PlatformSébastien Morel
 
PHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor IntroductionPHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor IntroductionOto Brglez
 
Professional PHP: an open-source alternative for enterprise development [Antw...
Professional PHP: an open-source alternative for enterprise development [Antw...Professional PHP: an open-source alternative for enterprise development [Antw...
Professional PHP: an open-source alternative for enterprise development [Antw...Combell NV
 
PhpStorm: Symfony2 Plugin
PhpStorm: Symfony2 PluginPhpStorm: Symfony2 Plugin
PhpStorm: Symfony2 PluginHaehnchen
 

Similaire à Introduction to PHP (SDPHP) (20)

Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHP
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1
 
Top 8 Powerful Tools Developers Use for Laravel Web Development.pdf
Top 8 Powerful Tools Developers Use for Laravel Web Development.pdfTop 8 Powerful Tools Developers Use for Laravel Web Development.pdf
Top 8 Powerful Tools Developers Use for Laravel Web Development.pdf
 
Federico Feroldi: PHP in Yahoo!
Federico Feroldi: PHP in Yahoo!Federico Feroldi: PHP in Yahoo!
Federico Feroldi: PHP in Yahoo!
 
Federico Feroldi Php In Yahoo
Federico Feroldi Php In YahooFederico Feroldi Php In Yahoo
Federico Feroldi Php In Yahoo
 
Integrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIntegrating PHP With System-i using Web Services
Integrating PHP With System-i using Web Services
 
Wc13
Wc13Wc13
Wc13
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
Php ppt
Php pptPhp ppt
Php ppt
 
Node.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdfNode.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdf
 
PHP, Java EE & .NET Comparison
PHP, Java EE & .NET ComparisonPHP, Java EE & .NET Comparison
PHP, Java EE & .NET Comparison
 
Php unit i
Php unit i Php unit i
Php unit i
 
Training ppt
Training pptTraining ppt
Training ppt
 
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
 
Unleash your Symfony projects with eZ Platform
Unleash your Symfony projects with eZ PlatformUnleash your Symfony projects with eZ Platform
Unleash your Symfony projects with eZ Platform
 
PHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor IntroductionPHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor Introduction
 
Professional PHP: an open-source alternative for enterprise development [Antw...
Professional PHP: an open-source alternative for enterprise development [Antw...Professional PHP: an open-source alternative for enterprise development [Antw...
Professional PHP: an open-source alternative for enterprise development [Antw...
 
PhpStorm: Symfony2 Plugin
PhpStorm: Symfony2 PluginPhpStorm: Symfony2 Plugin
PhpStorm: Symfony2 Plugin
 
Programming language
Programming languageProgramming language
Programming language
 
Php Ppt
Php PptPhp Ppt
Php Ppt
 

Dernier

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Dernier (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Introduction to PHP (SDPHP)

  • 1. INTRODUCTION TO PHP SDPHP Twitter: @sdphp | www.sdphp.org (coming soon) MeetUp: www.meetup.com/SanDiegoPHP/
  • 2. Who we are: Presenters John Congdon - Senior Web Developer at Networx Online Twitter: @johncongdon Email: john@sdphp.org LinkedIn: http://www.linkedin.com/in/johncongdon Eric Van Johnson - Systems Architect at AMCO International Education Services, Inc. Twitter: @shocm Email: eric@sdphp.org LinkedIn: http://www.linkedin.com/in/vanjohnson San Diego PHP User Group San Diego PHP Meetups => http://www.meetup.com/SanDiegoPHP/ Facebook => https://www.facebook.com/groups/SanDiegoPUG/ IRC => freenode.net #sdphp Twitter => @sdphp
  • 3. A quick history Created in 1994 by Rasmus Lerdorf and was a set of simple Common Gateway Interface (CGI) binaries written in the C programming language that he used for tracking visits to his online resume, he named the suite of scripts "Personal Home Page Tools" In 1998 PHP 3.0 is announced and is a complete rewrite of the platform. By this time Andi Gutmans and Zeev Suraski of Tel Aviv, Israel join Rasmus to collaborate on the new implementation. This is also when PHP got it's official name PHP: Hypertext Preprocessor, which is a recursive acronym.
  • 4. A quick history (cont.) PHP 4 is released in 2000 sporting a new engine dubbed 'Zend Engine' (comprised of the first names of Zeev and Andi). PHP 4.0 introduces a wide range of additional new features. In addition to the highly improved performance it also included key features such as support for many more web servers, HTTP sessions, output buffering, more secure ways of handling user input and several new language constructs. There are companies that still use PHP 4.x in their production environment. (And we like to make fun of them) PHP 5 released in 2004 powered by Zend Engine II with a new object mode. Current stable version of PHP is 5.4.8. Several new features come packed in the current releases of PHP such as Namespace support, Native JSON support, and security improvements.
  • 5. Who uses PHP? EVERYONE! Google / Yahoo / Facebook / Sony / Bank of America / NYSE / AT&T / Blah Blah Blah Blah
  • 7. VARIABLES A Variable, as the name suggests, can have its value change during the execution of a script.
  • 8. CONSTANTS A constant, once defined, cannot be changed or unset. Traditionally constants are uppercase.
  • 9. INCLUDE FILE.. ONCE Useful for class and function loading
  • 11. TYPES IN PHP ● Strings ● Integers ● Floats ● Arrays ● and many more...
  • 12. STRINGS What's the difference?
  • 14. ARRAYS Arrays are zero-based. Arrays can be of mixed types
  • 15. ASSOCIATIVE ARRAYS Key => Value pairs of data
  • 23. CONTINUE AND BREAK ● for ● foreach ● while ● do ... while ● switch
  • 37. DATABASE ACCESS Why you should be using PDO (PHP Data Objects) ● Cross Database Driver support ● Prepared Statements ● Proper bindings ● and lots lots more
  • 38. MODELS, VIEWS, CONTROLLERS ● Code Separation ● Reusability ● Ease Refactoring
  • 39. MODELS ● a model represents your data ● Logical container for ○ Database calls ○ API Access ● Models usually represent ○ Tables in a database ○ a file or collection of files on a hard drive ○ Documents stored in Mongo ○ Any other data containers you need to define
  • 40. VIEWS
  • 43. Other Cool Things PHP Can Do That Not a Lot of People Know. ● PHP CLI - PHP files don't have to be web pages. PHP is a very powerful language that can be used from the command line to perform a wide range of system task. ● As of PHP 5.4.0, the CLI SAPI provides a built-in web server. $ cd ~/public_html $ php -S localhost:8000
  • 44. Other Cool Things (cont) ● As of PHP 5.1.0, the CLI SAPI provides an interactive shell using the -a option.
  • 45. PHP Tools ● Text Editor (Notepad / Notepad ++) ● Vim IDEs ● Eclipse (Open Source) ○ PDT Plugin (Open Source) ○ Aptana PHP (Open Source) ■ Aptana Studio Pro (Commercial) ○ Zend Studio (Commercial) ● NetBeans (Open Source) ● PhpStorm (Commercial) ● NuSphere PhpED (Commercial)
  • 46. What Do Employers Look For? ● A college degree, so you are on the right track ● Code examples. Will typically check for a Github account. Make sure you have some publicly contributed code. Open Source Projects are good place to do this. ● Certifications ○ Zend PHP Certifications http://www.zend. com/services/certification/ ○ MySQL Developer http://education.oracle. com/pls/web_prod-plq-dad/db_pages.getpage? page_id=458&get_params=p_track_id:MDEV
  • 47. How Can You Improve Your Skills? ● SD PHP User Group ● Conferences ○ Code Works (Los Angeles Dec 12) ■ http://codeworks.phparch.com/los-angeles/ ○ PHP Tek (Chicago every year, usually May) ■ 2013 has not been announced yet ■ http://tek.phparch.com/ ○ ZendCon (October) ■ http://zendcon.com/ ● Contribute to Open Source ● Practice, practice, practice ● Learn to know what you don't know
  • 48. What Else Do Employers Look For? PASSION Development is a very personal thing. A developer needs to be creative, logical, focused, and enjoy what they are doing. Get involved with the PHP community. Forums, StackOverflow, Local User Groups like SDPHP ;-)
  • 49. Resources Local San Diego PHP Meetups => http://www.meetup.com/SanDiegoPHP/ Facebook => https://www.facebook.com/groups/SanDiegoPUG/ IRC => freenode.net #sdphp Twitter => @sdphp / @shocm / @johncongdon / @williammanley Others Zend.com StackOverflow => http://stackoverflow.com/questions/tagged/php php|Arch => http://www.phparch.com/
  • 50. Credits Original Presentation by William Cahill-Manley - Application Developer for Submodal Twitter: @williammanley Email: william@sdphp.org Today's Presenters John Congdon - Senior Web Developer at Networx Online Twitter: @johncongdon Email: john@sdphp.org LinkedIn: http://www.linkedin.com/in/johncongdon Eric Van Johnson - Systems Architect at AMCO International Education Services, Inc. Twitter: @shocm Email: eric@sdphp.org LinkedIn: http://www.linkedin.com/in/vanjohnson