HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to PHPVariablesData TypesOperatorsStringsArraysAssociative ArraysConditions (if / else)Loops (for / foreach / while)Functions
REFERENCE
📖 Overview
🖥️ Output
📦 Variables
🔢 Numbers & Math
✍️ String
📋 Array
🔁 Condition & Loop
🧩 Function
🔄 Type & Conversion
PHP›REFERENCE

PHP — Command Reference

PHP's most used commands and functions — a classic of web servers. Each with an explanation and a working example. (Examples start with <?php.)

8 categories · 33 commands

🖥️

Output

Printing to the screen and embedding variables in text.

echoEmbedding variables in text
2 commands →
📦

Variables

Variables and constants with $.

$variabledefine() / const
2 commands →
🔢

Numbers & Math

Arithmetic operations and mathematical functions.

Arithmetic ( + - * / % ** )round() / floor() / ceil()max() / min() / abs()rand() / mt_rand()
4 commands →
✍️

String

Text length, transformation, splitting, and searching.

strlen()strtoupper() / strtolower()trim()str_replace()+3
7 commands →
📋

Array

Working with indexed and associative (keyed) arrays.

array / [ ]array_push() / []in_array() / array_search()sort() / rsort()+3
7 commands →
🔁

Condition & Loop

Decision-making and repetition structures.

if / elseif / elseTernary operator ( ?: )forforeach+1
5 commands →
🧩

Function

Defining your own functions.

functionDefault parameterArrow function ( fn )
3 commands →
🔄

Type & Conversion

Type casting and checking.

(int) / intval() / floatval()(string) / strval()is_numeric() / gettype()
3 commands →
HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code