🐘
💻 For developers

PHP Basics

The language of web servers: from variable to a simple site

What you'll build
📘A solid foundation
⚡Practice in the browser
🎯Mini-projects
🎓Course certificate
📘 32 lessons⏱ 1-2 evenings🎓 Intermediate
🎯 Mission
Master PHP Basics
⚡+370XP
🏆CertificatePDF
🎓Course complete
Progress0 / 32 · 0%
Next up: What is PHP

Course program

01

Основы PHP

0 / 6 lessons
⌄
  1. 01

    What is PHP

    A server language•The <?php tag•The echo command⚡ +10
    ▶ Now
  2. 02

    Variables and the $ sign

    The $ sign•Assigning a value•Type via var_dump⚡ +10
    Open
  3. 03

    Data types

    int, float, bool•The null value•The gettype function⚡ +10
    Open
  4. 04

    Arithmetic and operators

    + - * / %•Integer division intdiv•Exponentiation **⚡ +10
    🔒 Pro
  5. 05

    String concatenation and the dot operator

    The dot operator•The .= shorthand•String and number⚡ +10
    🔒 Pro
  6. 06

    Comments and printf

    // and /* */ comments•printf formatting•%s %d %f⚡ +10
    🔒 Pro
02

Строки

0 / 5 lessons
⌄
  1. 07

    Double and single quotes

    Interpolation•Single quotes•Line break \n⚡ +10
    🔒 Pro
  2. 08

    String functions

    strlen length•strtoupper / lower•trim cleanup⚡ +10
    🔒 Pro
  3. 09

    str_replace and substr

    str_replace replacement•substr substring•strpos position⚡ +10
    🔒 Pro
  4. 10

    sprintf and number_format

    sprintf formatting•number_format for numbers⚡ +10
    🔒 Pro
  5. 11

    explode and implode

    explode splitting•implode joining•Array of strings⚡ +10
    🔒 Pro
03

Массивы

0 / 5 lessons
⌄
  1. 12

    Indexed array

    The array() function•Access by index•Length with count()⚡ +10
    🔒 Pro
  2. 13

    The foreach loop with an array

    foreach syntax•The as keyword•Printing an array⚡ +10
    🔒 Pro
  3. 14

    Associative array

    Key => value•Access by key•The array_keys function⚡ +10
    🔒 Pro
  4. 15

    foreach with an associative array

    $key => $value•Printing key-value•Nested array⚡ +10
    🔒 Pro
  5. 16

    Array functions

    array_push / pop•in_array search•sort / rsort⚡ +10
    🔒 Pro
04

Управление потоком

0 / 5 lessons
⌄
  1. 17

    if / elseif / else

    The if condition•The elseif branch•The else branch⚡ +10
    🔒 Pro
  2. 18

    The switch statement

    switch / case•Why break•The default branch⚡ +10
    🔒 Pro
  3. 19

    The for loop

    for syntax•Loop counter•Increment $i++⚡ +10
    🔒 Pro
  4. 20

    while and do-while

    The while condition•How do-while differs•break / continue⚡ +10
    🔒 Pro
  5. 21

    Ternary operator and match

    The ? : ternary•match in PHP 8•Null coalescing ??⚡ +10
    🔒 Pro
05

Функции

0 / 5 lessons
⌄
  1. 22

    Creating and calling a function

    The function keyword•Parameters•Return value⚡ +10
    🔒 Pro
  2. 23

    Default parameters

    Default value•Required parameter•Parameter order⚡ +10
    🔒 Pro
  3. 24

    Variable scope

    Local variable•The global keyword•Scope limitation⚡ +10
    🔒 Pro
  4. 25

    Anonymous and arrow functions

    Anonymous function•The use keyword•fn => arrow⚡ +10
    🔒 Pro
  5. 26

    array_map and array_filter

    array_map transform•array_filter filtering•array_reduce folding⚡ +10
    🔒 Pro
06

Формы и проекты

0 / 6 lessons
⌄
  1. 27

    The $_GET and $_POST superglobals

    $_GET URL parameters•$_POST form data•The isset check⚡ +10
    🔒 Pro
  2. 28

    Cleaning form data

    htmlspecialchars XSS•strip_tags cleanup•intval / floatval⚡ +10
    🔒 Pro
  3. 29

    Form handler (POST handler)

    $_SERVER['REQUEST_METHOD']•POST form•Redirect with header⚡ +10
    🔒 Pro
  4. 30

    Working with files (file I/O)

    file_put_contents write•file_get_contents read•file_exists check⚡ +10
    🔒 Pro
  5. 31

    Mini-project: simple router

    Determining the page from the URL•switch routing•404 page⚡ +10
    🔒 Pro
  6. 32

    Mini-project: Guestbook

    Saving POST data•Reading a file + output•A full CRUD cycle
    Course complete
    🔒 Pro