PHP course online
PHP is a popular server-side language - it powers logins, forms, shopping carts and communication with a database. On BitWizards it runs in your browser, with no server or XAMPP to install. In exercises with a database, a MariaDB server (compatible with MySQL) starts in the same tab. This is my own environment: I connected the PHP interpreter and the MariaDB engine (both in WebAssembly) with my own MySQL protocol server, form and session handling, database history and phpMyAdmin in the tab. Because the code runs on the student’s computer, plain PHP can be stepped through line by line, which remote execution on a server cannot offer.
Try PHP without signing in - PHP and MySQL course (in Polish): queries, tables, INSERT/UPDATE/DELETE, GET and POST forms, sessions and an INF.03-style project, with automatic checking.
What you will learn
- PHP syntax:
echo, variables, types, operators. - Conditional statements, loops, arrays (indexed and associative), functions.
- Connecting PHP to a MySQL database: reading and writing data.
- Generating dynamic HTML and previewing the result.
- Colors in the console: ANSI codes in
echofor text and background colors, bold text, a progress bar, a PASS/FAIL report and a colorful Christmas tree.
How you learn on BitWizards
- PHP 8.3 in the browser: you see the output of
echoright away, and an infinite loop does not freeze the tab. - Stepping: Step runs one statement, the inspector shows variables and the call stack, Pause stops the program at any moment.
- PHP with MySQL in a tab: the script connects with plain
mysqlito MariaDB in the same tab; forms, links and sessions work like on a web server, and a real phpMyAdmin is available too. Each exercise has its own database, restored to the starting data with one click. - Database history: every change to the data is saved in the work history, so the teacher can replay how the student got there.
- Server as a fallback: server-side PHP and MySQL in isolated containers still exist, but day to day everything happens in the browser.
- Automatic checking and a preview of the generated page.
PHP and the INF.03 exam
PHP is the heart of the server-side part of INF.03 (Polish vocational IT qualification). Together with HTML and CSS, JavaScript and SQL/MySQL it makes up a complete web application.
Colors in the console
The BitWizards console shows ANSI colors, so echo can print a red error message, a green “OK” or a Christmas tree with colorful baubles. Codes, examples in five languages and common mistakes are on the terminal colors page, and the exercises are in the Kolory w konsoli topic of the PHP basics course (in Polish).