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 c...
Review• Programming languages were invented so  that people could more easily control  computers  – Human like to interact...
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 ...
Sentences• Code is written in sentences called  “instructions”  Imperative and inquisitive modes  – Imperative     • $x = ...
Sigils• $ as a prefix to variables  – Common in languages – Perl, Java,    JavaScript  – Useful mnemonic device – avoids “...
Todays Exercises• Emulate the 10 PRINT program in PHP• Learn about arrays, control structures,  and functions• Riff on the...
Resources• PHP  – Manual from PHP’s Home Page  – PHP for Absolute Beginners• HTML and CSS  – W3Schools
Mdst3705 2013-01-24-php2
Upcoming SlideShare
Loading in …5
×

Mdst3705 2013-01-24-php2

528 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
528
On SlideShare
0
From Embeds
0
Number of Embeds
73
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mdst3705 2013-01-24-php2

  1. 1. PHP 2 Prof Alvarado MDST 370524 January 2013
  2. 2. Business• Reference materials posted• Use the principle of “TMI filtering” – Filter out what has not been covered – Be comfortable with knowing a little
  3. 3. 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
  4. 4. We live in “Barricell’s Universe”A world that has emerged from theuse of a a specific kind of computer
  5. 5. 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
  6. 6. 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?”
  7. 7. 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
  8. 8. Todays Exercises• Emulate the 10 PRINT program in PHP• Learn about arrays, control structures, and functions• Riff on the model to produce other outcomes
  9. 9. Resources• PHP – Manual from PHP’s Home Page – PHP for Absolute Beginners• HTML and CSS – W3Schools

×