Skip to content

Latest commit

 

History

History
137 lines (78 loc) · 2.55 KB

PHP.md

File metadata and controls

137 lines (78 loc) · 2.55 KB

Junior Level

PHP tags (standard, echo, short).

Single line comments; multi-line comments

Write data to the script’s output: echo vs print();

Script termination.

Constants. Possible ways to define. Possible values that they contain. Magic constants

Variables (naming, case-sensitivity)

Operators

Arithmetic operators ($a**2 etc)

Assignment operators ($a = 1 vs $a += 1, $a = $b vs $a = &$b etc)

Comparison Operators ($a == $b, $a === $b etc); Comparing of float values with epsilon technique

Incrementing/Decrementing Operators (echo $a++ vs echo ++$a)

Logical Operators ($a && $b, $a || $b, !$a etc.)

String operators (concatenation and concatenating assignment)

Debug functions (var_dump(), var_export(), print_r())

Control structures

if, while, for, foreach, switch and their alternative syntax

continue and break statements

Functions

Global and functional scope

Strings

Single quotes vs Double quotes

Using printf() for formatting

Arrays

Enumerative and associative

Short array syntax

Iteration of an array by using foreach

Web

HTTP request: HTTP method, URI, headers and request body

HTTP response: status code,headers and content

Web-Form submit

Data format inside request body

$_GET, $_POST, $_REQUEST

$_FILES

Сookies and sessions in php

Junior Strong Level

Data types: 4 scalar types, 4 compound types, 2 special types. Pseudo-types

Type Casting (with casting operators and functions). Detecting Types

Operators

Array Operators ($arr + $arrB, $arr == $arrB etc.)

Type Operators (instanceof)

Control structures

'Fall through' in switch statement

Ternary Operators

require vs include

Functions

Arguments by reference

Strings

Strings as Arrays

Search & replace

Arrays

Working with arrays as a stack and as a queue: array_push(), array_pop(), array_shift(), array_unshift()

Validate (in_array(), array_key_exists() etc)

Sort and shuffle arrays

OOP Fundamentals

Class vs object

Inheritance

Class methods and properties visibility. Default visibility

Middle Level

Variable variables

Operators

Operator precedence

Error Control operator

Functions

Type-hinting in functions

Return type declaration

Strings

Heredoc and Nowdoc Syntax

Security

‘Filter input Escape output’ rule

ctype_* functions, filter_var()

HTTPS concept

Cross-site scripting (XSS)

Cross-Site Request Forgeries

SQL injection attacks prevention

Other

phpdoc (@param, @return, @var etc)

Working with filesystem with C-style functions (open/create, read, write, and close a file handle, working with folders)