Variables, Data Types, and Operators
String: Hello, PHP!
Integer: 42
Float: 3.14
Boolean: true
Addition: 10 + 50 = 60
Subtraction: 10 - 50 = -40
Multiplication: 10 * 50 = 500
Division: 10 / 50 = 0.2
Modulus: 10 % 6 = 4
Comparison Operators
Does 100 == 100? bool(true)
Is 100 === 100? bool(false)
Is 200 > 100? bool(true)
Is 100 != 200? bool(true)
Logical Operators
Is age > 20 AND a student? bool(true)
Is age < 20 AND a student? bool(false)
Is the person NOT a student? bool(false)
Arrays and Loops
AppleCherryFruit #1 is Apple
Fruit #2 is Banana
Fruit #3 is Cherry
Fruit #4 is Date
I like Apple
I like Banana
I like Cherry
I like Date