SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Kürzlich hochgeladen (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

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