SlideShare una empresa de Scribd logo
1 de 49
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
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 /
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
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
       o Database calls
       o API Access
   •   Models usually represent
       o Tables in a database
       o a file or collection of files on a hard drive
       o Documents stored in Mongo
       o 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
More other cool things
•   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)
   o PDT Plugin (Open Source)
   o Aptana PHP (Open Source)
        Aptana Studio Pro (Commercial)
   o 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. Willyou have check publicly contributed
  account. Make sure
                       typically
                                 some
                                      for a Github

    code. Open Source Projects are good place to do this.

•   Certifications
    o   Zend PHP Certifications http://www.zend.com/services/certification/
    o    MySQL Developer http://education.oracle.com/pls/web_prod-plq-
        dad/db_pages.getpage?page_id=458&get_params=p_track_id:MDEV
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

Más contenido relacionado

La actualidad más candente

Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Muhamad Al Imran
 
Chapter 02 php basic syntax
Chapter 02   php basic syntaxChapter 02   php basic syntax
Chapter 02 php basic syntaxDhani Ahmad
 
Php introduction and configuration
Php introduction and configurationPhp introduction and configuration
Php introduction and configurationVijay Kumar Verma
 
Constructor and encapsulation in php
Constructor and encapsulation in phpConstructor and encapsulation in php
Constructor and encapsulation in phpSHIVANI SONI
 
PHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginnersPHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginnersMohammed Mushtaq Ahmed
 
PHP, PHP Developer, Hire PHP Developer, PHP Web Development, Hire PHP Program...
PHP, PHP Developer, Hire PHP Developer, PHP Web Development, Hire PHP Program...PHP, PHP Developer, Hire PHP Developer, PHP Web Development, Hire PHP Program...
PHP, PHP Developer, Hire PHP Developer, PHP Web Development, Hire PHP Program...bchrisopher
 
1336333055 php tutorial_from_beginner_to_master
1336333055 php tutorial_from_beginner_to_master1336333055 php tutorial_from_beginner_to_master
1336333055 php tutorial_from_beginner_to_masterjeeva indra
 
php app development 1
php app development 1php app development 1
php app development 1barryavery
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processorSiddique Ibrahim
 

La actualidad más candente (20)

Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
 
Chapter 02 php basic syntax
Chapter 02   php basic syntaxChapter 02   php basic syntax
Chapter 02 php basic syntax
 
Materi Dasar PHP
Materi Dasar PHPMateri Dasar PHP
Materi Dasar PHP
 
Php introduction and configuration
Php introduction and configurationPhp introduction and configuration
Php introduction and configuration
 
Php Basics
Php BasicsPhp Basics
Php Basics
 
Php introduction
Php introductionPhp introduction
Php introduction
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
PHP - Introduction to PHP
PHP -  Introduction to PHPPHP -  Introduction to PHP
PHP - Introduction to PHP
 
Constructor and encapsulation in php
Constructor and encapsulation in phpConstructor and encapsulation in php
Constructor and encapsulation in php
 
PHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginnersPHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginners
 
Welcome to computer programmer 2
Welcome to computer programmer 2Welcome to computer programmer 2
Welcome to computer programmer 2
 
PHP, PHP Developer, Hire PHP Developer, PHP Web Development, Hire PHP Program...
PHP, PHP Developer, Hire PHP Developer, PHP Web Development, Hire PHP Program...PHP, PHP Developer, Hire PHP Developer, PHP Web Development, Hire PHP Program...
PHP, PHP Developer, Hire PHP Developer, PHP Web Development, Hire PHP Program...
 
Php Unit 1
Php Unit 1Php Unit 1
Php Unit 1
 
Prersentation
PrersentationPrersentation
Prersentation
 
01 Php Introduction
01 Php Introduction01 Php Introduction
01 Php Introduction
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
1336333055 php tutorial_from_beginner_to_master
1336333055 php tutorial_from_beginner_to_master1336333055 php tutorial_from_beginner_to_master
1336333055 php tutorial_from_beginner_to_master
 
php_tizag_tutorial
php_tizag_tutorialphp_tizag_tutorial
php_tizag_tutorial
 
php app development 1
php app development 1php app development 1
php app development 1
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
 

Destacado

Chapter 4 Form Factors Power Supplies
Chapter 4 Form Factors Power SuppliesChapter 4 Form Factors Power Supplies
Chapter 4 Form Factors Power SuppliesPatty Ramsey
 
Chapter 10 Synchronous Communication
Chapter 10 Synchronous CommunicationChapter 10 Synchronous Communication
Chapter 10 Synchronous CommunicationPatty Ramsey
 
Preparing LiDAR for Use in ArcGIS 10.1 with the Data Interoperability Extension
Preparing LiDAR for Use in ArcGIS 10.1 with the Data Interoperability ExtensionPreparing LiDAR for Use in ArcGIS 10.1 with the Data Interoperability Extension
Preparing LiDAR for Use in ArcGIS 10.1 with the Data Interoperability ExtensionSafe Software
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHPprabhatjon
 
Appendex g
Appendex gAppendex g
Appendex gswavicky
 
Drought: Looking Back and Planning Ahead, Todd Votteler
Drought: Looking Back and Planning Ahead, Todd VottelerDrought: Looking Back and Planning Ahead, Todd Votteler
Drought: Looking Back and Planning Ahead, Todd VottelerTXGroundwaterSummit
 
PHP 5.3 Part 1 - Introduction to PHP 5.3
PHP 5.3 Part 1 - Introduction to PHP 5.3PHP 5.3 Part 1 - Introduction to PHP 5.3
PHP 5.3 Part 1 - Introduction to PHP 5.3melechi
 
Application of dual output LiDAR scanning system for power transmission line ...
Application of dual output LiDAR scanning system for power transmission line ...Application of dual output LiDAR scanning system for power transmission line ...
Application of dual output LiDAR scanning system for power transmission line ...Pedro Llorens
 
Ch4(saving state with cookies and query strings)
Ch4(saving state with cookies and query strings)Ch4(saving state with cookies and query strings)
Ch4(saving state with cookies and query strings)Chhom Karath
 
Ch2(working with forms)
Ch2(working with forms)Ch2(working with forms)
Ch2(working with forms)Chhom Karath
 
Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)Chhom Karath
 
Chapter 10 Synchronous Communication
Chapter 10 Synchronous CommunicationChapter 10 Synchronous Communication
Chapter 10 Synchronous CommunicationPatty Ramsey
 
Chapter 7 Multimedia
Chapter 7 MultimediaChapter 7 Multimedia
Chapter 7 MultimediaPatty Ramsey
 
Groundwater Research and Technology, Stefan Schuster
Groundwater Research and Technology, Stefan SchusterGroundwater Research and Technology, Stefan Schuster
Groundwater Research and Technology, Stefan SchusterTXGroundwaterSummit
 

Destacado (20)

Chapter 4 Form Factors Power Supplies
Chapter 4 Form Factors Power SuppliesChapter 4 Form Factors Power Supplies
Chapter 4 Form Factors Power Supplies
 
Chapter 10 Synchronous Communication
Chapter 10 Synchronous CommunicationChapter 10 Synchronous Communication
Chapter 10 Synchronous Communication
 
Preparing LiDAR for Use in ArcGIS 10.1 with the Data Interoperability Extension
Preparing LiDAR for Use in ArcGIS 10.1 with the Data Interoperability ExtensionPreparing LiDAR for Use in ArcGIS 10.1 with the Data Interoperability Extension
Preparing LiDAR for Use in ArcGIS 10.1 with the Data Interoperability Extension
 
C# programs
C# programsC# programs
C# programs
 
Ch07
Ch07Ch07
Ch07
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Appendex g
Appendex gAppendex g
Appendex g
 
Drought: Looking Back and Planning Ahead, Todd Votteler
Drought: Looking Back and Planning Ahead, Todd VottelerDrought: Looking Back and Planning Ahead, Todd Votteler
Drought: Looking Back and Planning Ahead, Todd Votteler
 
Chapter 5 Input
Chapter 5 InputChapter 5 Input
Chapter 5 Input
 
PHP 5.3 Part 1 - Introduction to PHP 5.3
PHP 5.3 Part 1 - Introduction to PHP 5.3PHP 5.3 Part 1 - Introduction to PHP 5.3
PHP 5.3 Part 1 - Introduction to PHP 5.3
 
Application of dual output LiDAR scanning system for power transmission line ...
Application of dual output LiDAR scanning system for power transmission line ...Application of dual output LiDAR scanning system for power transmission line ...
Application of dual output LiDAR scanning system for power transmission line ...
 
Ch4(saving state with cookies and query strings)
Ch4(saving state with cookies and query strings)Ch4(saving state with cookies and query strings)
Ch4(saving state with cookies and query strings)
 
Ch2(working with forms)
Ch2(working with forms)Ch2(working with forms)
Ch2(working with forms)
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)
 
Emoji International Name Finder
Emoji International Name FinderEmoji International Name Finder
Emoji International Name Finder
 
Chapter 10 Synchronous Communication
Chapter 10 Synchronous CommunicationChapter 10 Synchronous Communication
Chapter 10 Synchronous Communication
 
Chapter 7 Multimedia
Chapter 7 MultimediaChapter 7 Multimedia
Chapter 7 Multimedia
 
Intermediate PHP
Intermediate PHPIntermediate PHP
Intermediate PHP
 
Groundwater Research and Technology, Stefan Schuster
Groundwater Research and Technology, Stefan SchusterGroundwater Research and Technology, Stefan Schuster
Groundwater Research and Technology, Stefan Schuster
 

Similar a Introduction to PHP - SDPHP

Introduction to PHP (SDPHP)
Introduction to PHP   (SDPHP)Introduction to PHP   (SDPHP)
Introduction to PHP (SDPHP)Eric Johnson
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1ADARSH BHATT
 
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
 
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
 
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
 
Introduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital WorkplaceIntroduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital WorkplaceJen Wei Lee
 
Desktop Apps with PHP and Titanium
Desktop Apps with PHP and TitaniumDesktop Apps with PHP and Titanium
Desktop Apps with PHP and TitaniumBen Ramsey
 
Neev Open Source Contributions
Neev Open Source ContributionsNeev Open Source Contributions
Neev Open Source ContributionsNeev Technologies
 
A high profile project with Symfony and API Platform: beIN SPORTS
A high profile project with Symfony and API Platform: beIN SPORTSA high profile project with Symfony and API Platform: beIN SPORTS
A high profile project with Symfony and API Platform: beIN SPORTSSmile I.T is open
 
PHP - History, Introduction, Summary, Extensions and Frameworks
PHP - History, Introduction, Summary, Extensions and FrameworksPHP - History, Introduction, Summary, Extensions and Frameworks
PHP - History, Introduction, Summary, Extensions and FrameworksRoyston Olivera
 

Similar a Introduction to PHP - SDPHP (20)

Introduction to PHP (SDPHP)
Introduction to PHP   (SDPHP)Introduction to PHP   (SDPHP)
Introduction to PHP (SDPHP)
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1
 
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
 
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
 
Php unit i
Php unit i Php unit i
Php unit i
 
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
PhpPhp
Php
 
Introduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital WorkplaceIntroduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital Workplace
 
Php
PhpPhp
Php
 
Desktop Apps with PHP and Titanium
Desktop Apps with PHP and TitaniumDesktop Apps with PHP and Titanium
Desktop Apps with PHP and Titanium
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
Php ppt
Php pptPhp ppt
Php ppt
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
 
Tech talk: PHP
Tech talk: PHPTech talk: PHP
Tech talk: PHP
 
Php Ppt
Php PptPhp Ppt
Php Ppt
 
Neev Open Source Contributions
Neev Open Source ContributionsNeev Open Source Contributions
Neev Open Source Contributions
 
A high profile project with Symfony and API Platform: beIN SPORTS
A high profile project with Symfony and API Platform: beIN SPORTSA high profile project with Symfony and API Platform: beIN SPORTS
A high profile project with Symfony and API Platform: beIN SPORTS
 
PHP - History, Introduction, Summary, Extensions and Frameworks
PHP - History, Introduction, Summary, Extensions and FrameworksPHP - History, Introduction, Summary, Extensions and Frameworks
PHP - History, Introduction, Summary, Extensions and Frameworks
 
PHP Web Development.pdf
PHP Web Development.pdfPHP Web Development.pdf
PHP Web Development.pdf
 

Último

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
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
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 

Último (20)

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 

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
  • 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 /
  • 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.
  • 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 o Database calls o API Access • Models usually represent o Tables in a database o a file or collection of files on a hard drive o Documents stored in Mongo o 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. More other cool things • 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) o PDT Plugin (Open Source) o Aptana PHP (Open Source)  Aptana Studio Pro (Commercial) o 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. Willyou have check publicly contributed account. Make sure typically some for a Github code. Open Source Projects are good place to do this. • Certifications o Zend PHP Certifications http://www.zend.com/services/certification/ o MySQL Developer http://education.oracle.com/pls/web_prod-plq- dad/db_pages.getpage?page_id=458&get_params=p_track_id:MDEV
  • 47. 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 ;-)
  • 48. 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/
  • 49. 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