Language Basics
This chapter covers the fundamental building blocks of Zymba: variables, data types, operators, expressions, and the language constructs that appear in every Zymba file.
Understanding these concepts is essential before tackling control flow, functions, or platform integration.
Built-in static classes
Zymba provides a rich set of built-in static classes accessed with the @ prefix. These are the core utilities available without any include statement:
| Class | Purpose |
|---|---|
@Array | Array manipulation (97 methods: sort, filter, map, join, etc.) |
@String | String operations (96 methods: trim, replace, pad, case, etc.) |
@Math | Mathematical functions (62 methods: trig, log, rounding, etc.) |
@Number | Number formatting, type checks, base conversion (42 methods) |
@Date | Date/time operations (31 methods: now, format, parse, etc.) |
@Var | JSON/PHP serialization, type inspection, cloning (30 methods) |
@Statistic | Statistical analysis (29 methods: mean, median, mode, etc.) |
@Crypt | Hashing, encryption, JWT, UUID generation (22 methods) |
@URI | URL encoding/decoding, query strings, parsing (20 methods) |
@Path | File path manipulation (15 methods) |
@MIME | Base64 and MIME encoding (12 methods) |
@Regex | Regular expression matching and replacement (11 methods) |
@System | System info: host, PID, memory usage (8 methods) |
@HTTP | HTTP client/server operations (42 methods) |
@SQL | SQL query preparation and escaping (4 static methods) |
@IO | File, directory, and stream operations (61 methods) |
@DNS | DNS resolution and validation (7 methods) |
@Function | Function introspection and reflection (7 methods) |
@Console | Logging and debug output (7 methods) |
@Output | Output buffering control (6 methods) |
@XML | XML parsing and generation (5 methods) |
@ZLIB | Compression: deflate, inflate, gzip (6 methods) |
@Exception | Exception creation and stack traces |
@ZeyOS | Platform integration, database, entities (16 methods) |
Platform-specific classes (@ZeyOS, @HTTP, @SQL, @IO) are covered in detail in later chapters.