Hello!

BrainTech - software solutions, web design and applications.

Contact

Module 1 – Introduction to Web Development Lesson

What is PHP?

PHP – server-side language

PHP (Hypertext Preprocessor) is an open-source scripting language designed for building dynamic websites. Unlike HTML, which the browser interprets locally, PHP code runs on the server before the response is sent to the client. The result of a PHP script is usually HTML, JSON, or another format that the browser or application can display. PHP powers over 75% of websites and runs systems such as WordPress, Laravel, and Symfony.

Why learn PHP?

  • Quick entry into web development without a complex environment.
  • Huge community, documentation, and free tools (XAMPP, Composer).
  • Direct connection with MySQL databases and HTML forms – ideal for practical projects.

Where is PHP used?

Backend APIs, admin panels, e-commerce, CMS platforms, internal company tools, and microservices. PHP 8+ brings modern features: types, JIT compiler, and better performance.

<?php
declare(strict_types=1);

echo "Zdravo, PHP svete!";
$godina = (int) date("Y");
echo "<p>Trenutna godina: {$godina}</p>";

First file in XAMPP

Create the folder htdocs/php-kurs and the file index.php. Save the example from the lesson, open http://localhost/php-kurs/ and check the output. Then add the line phpinfo();, view the PHP version, and remove that line before production.

Compare HTML and PHP

<!-- index.html -->
<h1>Statičan naslov</h1>

<?php // index.php ?>
<h1>Danas je <?= date("d.m.Y") ?></h1>
Design Wireframe
High Fidelity Design
Design development
Design development
Design development
Research development