🐘
💻 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 lessons1-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 languageThe <?php tagThe echo command⚡ +10
    ▶ Now
  2. 02

    Variables and the $ sign

    The $ signAssigning a valueType via var_dump⚡ +10
    Open
  3. 03

    Data types

    int, float, boolThe null valueThe gettype function⚡ +10
    Open
  4. 04

    Arithmetic and operators

    + - * / %Integer division intdivExponentiation **⚡ +10
    🔒 Pro
  5. 05

    String concatenation and the dot operator

    The dot operatorThe .= shorthandString and number⚡ +10
    🔒 Pro
  6. 06

    Comments and printf

    // and /* */ commentsprintf formatting%s %d %f⚡ +10
    🔒 Pro
02

Строки

0 / 5 lessons
  1. 07

    Double and single quotes

    InterpolationSingle quotesLine break \n⚡ +10
    🔒 Pro
  2. 08

    String functions

    strlen lengthstrtoupper / lowertrim cleanup⚡ +10
    🔒 Pro
  3. 09

    str_replace and substr

    str_replace replacementsubstr substringstrpos position⚡ +10
    🔒 Pro
  4. 10

    sprintf and number_format

    sprintf formattingnumber_format for numbers⚡ +10
    🔒 Pro
  5. 11

    explode and implode

    explode splittingimplode joiningArray of strings⚡ +10
    🔒 Pro
03

Массивы

0 / 5 lessons
  1. 12

    Indexed array

    The array() functionAccess by indexLength with count()⚡ +10
    🔒 Pro
  2. 13

    The foreach loop with an array

    foreach syntaxThe as keywordPrinting an array⚡ +10
    🔒 Pro
  3. 14

    Associative array

    Key => valueAccess by keyThe array_keys function⚡ +10
    🔒 Pro
  4. 15

    foreach with an associative array

    $key => $valuePrinting key-valueNested array⚡ +10
    🔒 Pro
  5. 16

    Array functions

    array_push / popin_array searchsort / rsort⚡ +10
    🔒 Pro
04

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

0 / 5 lessons
  1. 17

    if / elseif / else

    The if conditionThe elseif branchThe else branch⚡ +10
    🔒 Pro
  2. 18

    The switch statement

    switch / caseWhy breakThe default branch⚡ +10
    🔒 Pro
  3. 19

    The for loop

    for syntaxLoop counterIncrement $i++⚡ +10
    🔒 Pro
  4. 20

    while and do-while

    The while conditionHow do-while differsbreak / continue⚡ +10
    🔒 Pro
  5. 21

    Ternary operator and match

    The ? : ternarymatch in PHP 8Null coalescing ??⚡ +10
    🔒 Pro
05

Функции

0 / 5 lessons
  1. 22

    Creating and calling a function

    The function keywordParametersReturn value⚡ +10
    🔒 Pro
  2. 23

    Default parameters

    Default valueRequired parameterParameter order⚡ +10
    🔒 Pro
  3. 24

    Variable scope

    Local variableThe global keywordScope limitation⚡ +10
    🔒 Pro
  4. 25

    Anonymous and arrow functions

    Anonymous functionThe use keywordfn => arrow⚡ +10
    🔒 Pro
  5. 26

    array_map and array_filter

    array_map transformarray_filter filteringarray_reduce folding⚡ +10
    🔒 Pro
06

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

0 / 6 lessons
  1. 27

    The $_GET and $_POST superglobals

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

    Cleaning form data

    htmlspecialchars XSSstrip_tags cleanupintval / floatval⚡ +10
    🔒 Pro
  3. 29

    Form handler (POST handler)

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

    Working with files (file I/O)

    file_put_contents writefile_get_contents readfile_exists check⚡ +10
    🔒 Pro
  5. 31

    Mini-project: simple router

    Determining the page from the URLswitch routing404 page⚡ +10
    🔒 Pro
  6. 32

    Mini-project: Guestbook

    Saving POST dataReading a file + outputA full CRUD cycle
    Course complete
    🔒 Pro
PHP Basics — online coding course