Beruflich Dokumente
Kultur Dokumente
Scrum
What is Agile?
User Stories
Because life's too short to write everything down
User stories are features our customers might one day like to
see in their software.
Estimation - Absolute
The fine art of expectation guessing
Estimation
Estimation - Relative
It turns out, we are pretty
good at estimating things
relatively
Sizing our stories
Estimation
Iterations
An Agile iteration is a short one to two week period where a
team takes a couple of their customers most important user
stories and builds them completely as running-testedsoftware.
Estimation
Agile - Summary
Basic Syntax
Commenting
<?php
// This is single line comment
/*
echo This is multiline comment;
*/
?>
Type of Errors
Fatal Errors : These errors are critical errors. It results termination of script
execution
PHP Variables
Declaration of PHP variable starts with $ symbol.
e.g. $variable_name = value;
Variable Naming Rules : A variable name can only contain alpha-numeric characters and
underscores (a-Z, 0-9, and _ )
A variable name should not contain spaces.
Variables are case-sensitive
If a variable name is more than one word, it should be separated
with underscore
PHP Arrays
Numeric Array : Arrays with a numeric index
$vehicleArray = array(car, bus);
Associative Array : Arrays with named keys
$ages = array("Jon"=>26, "Arya"=>20, "Sansa"=>24);
Multidimensional Array : Arrays containing one or more arrays
$familyArray = array(Eddard=>array(Rob, Jon, Arya),
Lannister=>array(Jammie, Tyrion, Cersei));
PHP Strings
String variables are used for values that contains character strings.
e.g.
$string = Hello World;
For merging strings concatenation operator(.) is used
e.g.
$string1 = Hello;
$string2 = World;
echo $string1. .$string2 // Output Hello World
PHP Constants
Constant can be defined using define.
Constant's value can not be altered.
e.g.
define(CONSTANT, 'php');
echo CONSTANT;
//prints php
Operator Types
PHP language supports following type of operators.
Arithmetic Operators (+,-,*,%)
Comparison Operators (==, ===, !=, !==, <, > <=, >=)
Logical (or Relational) Operators (and, or, &&, ||, !)
Assignment Operators (=, +=, -=, *=, /=, %=)
Conditional (or ternary) Operators ( ? : )
Type of Loops
PHP supports following four loop types
for :- loops through a block of code a specified number of times.
while :- loops through a block of code if and as long as a specified
condition is true.
do...while :- loops through a block of code once, and then repeats the
loop as long as a special condition is true.
foreach :- loops through a block of code for each element in an array.
continue and break keywords can be used to control loop execution.
?>
$i = 0;
do {
print $i;
} while ($i > 0);
print $i;
}
Foreach Loop
$arr = array(1, 2, 3, 4);
foreach ($arr as $value) {
echo $value;
}
Switch Statement
switch (n)
{
case label1:
break;
case label2:
break;
default:
Functions
Superglobals
PHP superglobal variables are : $GLOBALS
$_SERVER
$_REQUEST
$_POST
$_GET
$_FILES
$_ENV
$_COOKIE
$_SESSION
Reference Links
http://www.php.net/manual
http://www.w3schools.com/php/default.asp
http://www.tutorialspoint.com/php/
Thank You