Mdst3705 2013-01-24-php2
Upcoming SlideShare
Loading in...5
×
 

Mdst3705 2013-01-24-php2

on

  • 536 views

 

Statistics

Views

Total Views
536
Views on SlideShare
464
Embed Views
72

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 72

http://pages.shanti.virginia.edu 72

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Mdst3705 2013-01-24-php2 Mdst3705 2013-01-24-php2 Document Transcript

    • PHP 2 Prof Alvarado MDST 370524 January 2013
    • Business• Reference materials posted• Use the principle of “TMI filtering” – Filter out what has not been covered – Be comfortable with knowing a little
    • Review• Programming languages were invented so that people could more easily control computers – Human like to interact with objects in the world through language• But like natural languages, programming languages involve worlds – Worlds are implied by code – Worlds are modeled in code – Worlds are created by code
    • We live in “Barricell’s Universe”A world that has emerged from theuse of a a specific kind of computer
    • PHP as a language• Variables – Variables are like nouns – Refer to locations in memory (pigeon holes)• Values – Values are like meanings – Strings and numbers that are stored in memory• Expressions – Expressions, e.g. $x + 1, are like clauses – Expressions always “return” a value
    • Sentences• Code is written in sentences called “instructions” Imperative and inquisitive modes – Imperative • $x = $y; // Like saying, “Let $x = $y” • $x = 1 * 50 + $z; – Inquisitive • If ($x == 1) {} // Like asking, “Is $x equal to 1?”
    • Sigils• $ as a prefix to variables – Common in languages – Perl, Java, JavaScript – Useful mnemonic device – avoids “Hungarian notation”• Derives from medieval and renaissance magic – Sigil as a seal representing an angel or demon – a “logo”• Also used as a personal logo
    • Todays Exercises• Emulate the 10 PRINT program in PHP• Learn about arrays, control structures, and functions• Riff on the model to produce other outcomes
    • Resources• PHP – Manual from PHP’s Home Page – PHP for Absolute Beginners• HTML and CSS – W3Schools