CodeDala
Home
Courses
Paths
Marketplace
How it works
Pricing
🌐
KZ
RU
EN
Log in
Start free
Order a project
🐘
💻 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
⚡
+370
XP
🏆
Certificate
PDF
🎓
Course complete
Progress
0 / 32 · 0%
Next up:
What is PHP
Start the project →
Course program
01
Основы PHP
0 / 6 lessons
⌄
01
What is PHP
A server language
•
The <?php tag
•
The echo command
⚡ +10
▶ Now
02
Variables and the $ sign
The $ sign
•
Assigning a value
•
Type via var_dump
⚡ +10
Open
03
Data types
int, float, bool
•
The null value
•
The gettype function
⚡ +10
Open
04
Arithmetic and operators
+ - * / %
•
Integer division intdiv
•
Exponentiation **
⚡ +10
🔒 Pro
05
String concatenation and the dot operator
The dot operator
•
The .= shorthand
•
String and number
⚡ +10
🔒 Pro
06
Comments and printf
// and /* */ comments
•
printf formatting
•
%s %d %f
⚡ +10
🔒 Pro
02
Строки
0 / 5 lessons
⌄
07
Double and single quotes
Interpolation
•
Single quotes
•
Line break \n
⚡ +10
🔒 Pro
08
String functions
strlen length
•
strtoupper / lower
•
trim cleanup
⚡ +10
🔒 Pro
09
str_replace and substr
str_replace replacement
•
substr substring
•
strpos position
⚡ +10
🔒 Pro
10
sprintf and number_format
sprintf formatting
•
number_format for numbers
⚡ +10
🔒 Pro
11
explode and implode
explode splitting
•
implode joining
•
Array of strings
⚡ +10
🔒 Pro
03
Массивы
0 / 5 lessons
⌄
12
Indexed array
The array() function
•
Access by index
•
Length with count()
⚡ +10
🔒 Pro
13
The foreach loop with an array
foreach syntax
•
The as keyword
•
Printing an array
⚡ +10
🔒 Pro
14
Associative array
Key => value
•
Access by key
•
The array_keys function
⚡ +10
🔒 Pro
15
foreach with an associative array
$key => $value
•
Printing key-value
•
Nested array
⚡ +10
🔒 Pro
16
Array functions
array_push / pop
•
in_array search
•
sort / rsort
⚡ +10
🔒 Pro
04
Управление потоком
0 / 5 lessons
⌄
17
if / elseif / else
The if condition
•
The elseif branch
•
The else branch
⚡ +10
🔒 Pro
18
The switch statement
switch / case
•
Why break
•
The default branch
⚡ +10
🔒 Pro
19
The for loop
for syntax
•
Loop counter
•
Increment $i++
⚡ +10
🔒 Pro
20
while and do-while
The while condition
•
How do-while differs
•
break / continue
⚡ +10
🔒 Pro
21
Ternary operator and match
The ? : ternary
•
match in PHP 8
•
Null coalescing ??
⚡ +10
🔒 Pro
05
Функции
0 / 5 lessons
⌄
22
Creating and calling a function
The function keyword
•
Parameters
•
Return value
⚡ +10
🔒 Pro
23
Default parameters
Default value
•
Required parameter
•
Parameter order
⚡ +10
🔒 Pro
24
Variable scope
Local variable
•
The global keyword
•
Scope limitation
⚡ +10
🔒 Pro
25
Anonymous and arrow functions
Anonymous function
•
The use keyword
•
fn => arrow
⚡ +10
🔒 Pro
26
array_map and array_filter
array_map transform
•
array_filter filtering
•
array_reduce folding
⚡ +10
🔒 Pro
06
Формы и проекты
0 / 6 lessons
⌄
27
The $_GET and $_POST superglobals
$_GET URL parameters
•
$_POST form data
•
The isset check
⚡ +10
🔒 Pro
28
Cleaning form data
htmlspecialchars XSS
•
strip_tags cleanup
•
intval / floatval
⚡ +10
🔒 Pro
29
Form handler (POST handler)
$_SERVER['REQUEST_METHOD']
•
POST form
•
Redirect with header
⚡ +10
🔒 Pro
30
Working with files (file I/O)
file_put_contents write
•
file_get_contents read
•
file_exists check
⚡ +10
🔒 Pro
31
Mini-project: simple router
Determining the page from the URL
•
switch routing
•
404 page
⚡ +10
🔒 Pro
32
Mini-project: Guestbook
Saving POST data
•
Reading a file + output
•
A full CRUD cycle
🎓
Course complete
🔒 Pro
PHP Basics — online coding course