Skip to main content

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:

ClassPurpose
@ArrayArray manipulation (97 methods: sort, filter, map, join, etc.)
@StringString operations (96 methods: trim, replace, pad, case, etc.)
@MathMathematical functions (62 methods: trig, log, rounding, etc.)
@NumberNumber formatting, type checks, base conversion (42 methods)
@DateDate/time operations (31 methods: now, format, parse, etc.)
@VarJSON/PHP serialization, type inspection, cloning (30 methods)
@StatisticStatistical analysis (29 methods: mean, median, mode, etc.)
@CryptHashing, encryption, JWT, UUID generation (22 methods)
@URIURL encoding/decoding, query strings, parsing (20 methods)
@PathFile path manipulation (15 methods)
@MIMEBase64 and MIME encoding (12 methods)
@RegexRegular expression matching and replacement (11 methods)
@SystemSystem info: host, PID, memory usage (8 methods)
@HTTPHTTP client/server operations (42 methods)
@SQLSQL query preparation and escaping (4 static methods)
@IOFile, directory, and stream operations (61 methods)
@DNSDNS resolution and validation (7 methods)
@FunctionFunction introspection and reflection (7 methods)
@ConsoleLogging and debug output (7 methods)
@OutputOutput buffering control (6 methods)
@XMLXML parsing and generation (5 methods)
@ZLIBCompression: deflate, inflate, gzip (6 methods)
@ExceptionException creation and stack traces
@ZeyOSPlatform integration, database, entities (16 methods)

Platform-specific classes (@ZeyOS, @HTTP, @SQL, @IO) are covered in detail in later chapters.

See also

  • Variables — declaration, scope, include, with
  • Types — scalar types, complex types, type checking, casting
  • Operators — arithmetic, string, comparison, logical, and special operators