Sei sulla pagina 1di 2

CORPORATE TRAINING BOOK – PHP

TABLE OF CONTENTS
1. Objective...................................................................................................................................... 1
2. Introduction................................................................................................................................. 1
2.1 What is PHP ?................................................................................................................ 1
2.2 What can PHP do?......................................................................................................... 1
3. Types............................................................................................................................................ 2
3.1 Introduction..................................................................................................................... 2
3.2 Boolean........................................................................................................................... 2
3.3 Integers............................................................................................................................ 2
3.4 Floating number.............................................................................................................. 3
3.5 Strings.............................................................................................................................. 3
3.6 Array................................................................................................................................. 5
4. Variables....................................................................................................................................... 7
4.1 Basics..................................................................................................................... ......... 7
4.2 Predefined variables....................................................................................................... 7
4.3 Variable scope................................................................................................................. 8
4.4 Variable variables............................................................................................................ 8
4.5 Variables from external sources.................................................................................... 9
5. Operators...................................................................................................................................... 11
5.1 Operator precedence...................................................................................................... 11
5.2 Arithmetic operators....................................................................................................... 11
5.3 Assignment operators..................................................................................................... 12
5.4 Bitwise operators............................................................................................................. 12
5.5 Comparison operators.................................................................................................... 13
5.6 Execution operators........................................................................................................ 14
5.7 Incrementing/decrementing operators.......................................................................... 14
5.8 Logical operators............................................................................................................. 15
5.9 String operators............................................................................................................... 15
5.10 Type Operators................................................................................................................ 15
6. Control Structures....................................................................................................................... 19
6.1 If........................................................................................................................................ 19
6.2 Else................................................................................................................................... 19
6.3 Elseif/else if...................................................................................................................... 20
6.4 Do while............................................................................................................................ 20
6.5 For..................................................................................................................................... 21
6.6 Foreach............................................................................................................................. 22
6.7 Break................................................................................................................................. 23
6.8 Continue........................................................................................................................... 23
6.9 Switch............................................................................................................................... 24
6.10 Goto.................................................................................................................................. 24
CORPORATE TRAINING BOOK – PHP

7. Functions...................................................................................................................................... 26
7.1 User defined functions................................................................................................... 26
7.2 Function arguments....................................................................................................... 26
7.3 Returning values............................................................................................................. 26
7.4 Variables functions......................................................................................................... 27
7.5 Internal (built-in) functions............................................................................................. 27
8. Classes and Objects..................................................................................................................... 29
8.1 Introduction...................................................................................................................... 29
8.2 The basics........................................................................................................................ 29
8.3 Constructors and destructors....................................................................................... 29
8.4 Visibility............................................................................................................................ 33
8.5 Object inheritance............................................................................................................ 32
8.6 Scope resolution operator (::)......................................................................................... 33
8.7 Static keywords................................................................................................................ 34
8.8 Class abstraction............................................................................................................. 35
8.9 Object interfaces.............................................................................................................. 36
8.10 Anonymous classes........................................................................................................ 38
8.11 Overloading...................................................................................................................... 38
9. Superglobals................................................................................................................................. 39
9.1 $_GLOBALS..................................................................................................................... 40
9.2 $_SERVER......................................................................................................................... 40
9.3 $_GET............................................................................................................................... 40
9.4 $_POST............................................................................................................................. 41
9.5 $_COOKIE......................................................................................................................... 42
9.6 $_SESSION....................................................................................................................... 42
9.7 $_REQUEST....................................................................................................................... 42

10. Features........................................................................................................................................ 44
10.1 File handling.................................................................................................................... 44
10.2 File Uploads...................................................................................................................... 47
10.3 Cookie............................................................................................................................... 48
10.4 Session............................................................................................................................. 49
10.5 Arrays................................................................................................................................ 50
11. Mail Functions............................................................................................................................... 53
12. Exception handling....................................................................................................................... 54
13. MySQLI Functions ......................................................................................................................... 57

Potrebbero piacerti anche