0% found this document useful (0 votes)
34 views18 pages

Modul - 1 Installasi XAMPP Server Side

This document provides an introduction to basic PHP programming. It discusses installing Xampp and Visual Studio Code as development environments. It also covers basic PHP syntax like comments, variables, data types, operators, conditions, loops, and arrays. The document includes example code and exercises to demonstrate various PHP concepts. Links are provided for additional references on PHP fundamentals.

Uploaded by

Vincent Tionando
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views18 pages

Modul - 1 Installasi XAMPP Server Side

This document provides an introduction to basic PHP programming. It discusses installing Xampp and Visual Studio Code as development environments. It also covers basic PHP syntax like comments, variables, data types, operators, conditions, loops, and arrays. The document includes example code and exercises to demonstrate various PHP concepts. Links are provided for additional references on PHP fundamentals.

Uploaded by

Vincent Tionando
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

HRIS PROGRAMMING INTRODUCTION

Basic PHP

Installasi Xampp

Download Link : https://www.apachefriends.org/index.html


Link Reference : https://www.niagahoster.co.id/blog/cara-instal-xampp/

Go To Page Download Install


Basic PHP

Installasi Vscode
Download Link : https://visualstudio.microsoft.com/
Link Reference : https://www.sebardi.id/2021/06/cara-install-visual-studio-code-di.html

Go To Page Download Install


Basic PHP

Running DB Tools / PHPMyadmin

DB Tools (HeidiSQL) : https://www.heidisql.com/download.php


PHPMyAdmin : localhost/PHPMyAdmin
Basic PHP

Basic PHP Syntax


Basic PHP

PHP Comments
Basic PHP

PHP Variables
Basic PHP

PHP Data Types

Variables can store data of different types, and


different data types can do different things.
PHP supports the following data types:
•String
•Integer
•Float (floating point numbers - also called
double)
•Boolean
•Array
•Object
•NULL
•Resource
Basic PHP

PHP Operators

Operator Name Example Result

== Equal $x == $y Returns true if $x is equal to $y

=== Identical $x === $y Returns true if $x is equal to $y, and they are of the same type

!= Not equal $x != $y Returns true if $x is not equal to $y

<> Not equal $x <> $y Returns true if $x is not equal to $y

!== Not identical $x !== $y Returns true if $x is not equal to $y, or they are not of the same type

> Greater than $x > $y Returns true if $x is greater than $y

< Less than $x < $y Returns true if $x is less than $y

>= Greater than or equal to $x >= $y Returns true if $x is greater than or equal to $y

<= Less than or equal to $x <= $y Returns true if $x is less than or equal to $y

<=> Spaceship $x <=> $y Returns an integer less than, equal to, or greater than zero, depending on if $x is less than, equal to,
or greater than $y. Introduced in PHP 7.
Basic PHP

PHP Logical Operators

Operator Name Example Result

and And $x and $y True if both $x and $y are true

or Or $x or $y True if either $x or $y is true

xor Xor $x xor $y True if either $x or $y is true, but not both

&& And $x && $y True if both $x and $y are true

|| Or $x || $y True if either $x or $y is true

! Not !$x True if $x is not true


Basic PHP

Exercise

1. Kalikan 10 dengan 5, dan keluarkan hasilnya.

2. Bagilah 10 dengan 5, dan keluarkan hasilnya

3. Gunakan operator perbandingan yang benar untuk memeriksa apakah $a sama dengan $b.

4. Gunakan operator perbandingan yang benar untuk memeriksa apakah $a TIDAK sama
dengan $b.
Basic PHP

PHP Conditions
Basic PHP

Exercise

1. Keluarkan “Condition True" jika $x TIDAK sama dengan $y.


Basic PHP

PHP Loops
Basic PHP

PHP Arrays
Basic PHP

Basic Syntax
- Basic PHP Syntax (https://www.w3schools.com/php/php_syntax.asp)
- PHP Comments (https://www.w3schools.com/php/php_comments.asp)
- PHP Variables (https://www.w3schools.com/php/php_variables.asp)
- PHP Data Types (https://www.w3schools.com/php/php_datatypes.asp)
- PHP Operators (https://www.w3schools.com/php/php_operators.asp)
- PHP Conditions (https://www.w3schools.com/php/php_if_else.asp)
- PHP Loops (https://www.w3schools.com/php/php_looping.asp)
- PHP Arrays (https://www.w3schools.com/php/php_arrays.asp)
Q&A
#HRISsharingiscaring
THANK YOU
#HRISsharingiscaring

You might also like