← CodeClarityLab Home
Browse by Category
+ added · updated 7d
✕ Clear A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Scalar Type Declarations (PHP 7.0) PHP 7.0+
PHP 7.0 added int, float, string, bool type declarations for function parameters — the biggest type safety leap in PHP history, enabling static analysis.
2mo ago php beginner
Short Open Tags History & Why to Avoid PHP 3.0+
PHP's short tags (<? ?> and <?= ?>) have been problematic since PHP 3 — disabled by many hosting providers, conflicting with XML, and inconsistent across environments.
2mo ago php beginner
SimpleXML — Parsing XML in PHP PHP 5.0+
SimpleXML provides the fastest way to read well-formed XML in PHP — simplexml_load_string() or simplexml_load_file() returns an object where elements are properties and attributes are array-accessed, requiring no tree traversal.
2mo ago php beginner
Spans & Traces
A trace is one request's full journey; spans are the individual operations within it — each span has a name, start time, duration, status, and optional attributes.
2mo ago observability beginner
Spread Operator & Variadic Args (PHP 5.6) PHP 5.6+
PHP 5.6 added variadic functions (...$args) and argument unpacking ($array...) — replacing func_get_args() and call_user_func_array() with clean syntax.
2mo ago php beginner
sprintf() — Format Strings in PHP PHP 4.0+
sprintf() builds a string by substituting typed placeholders (%s, %d, %f, %05d) with values — safer and more expressive than string concatenation or interpolation for formatted output, especially for numbers, padding, and locale-independent formatting.
2mo ago php beginner
Spaceship Operator <=> (PHP 7.0) PHP 7.0+
The spaceship operator <=> returns -1, 0, or 1 by comparing two values — it replaces verbose if/else comparison callbacks in usort() with a single concise expression.
2mo ago php beginner
Spread Operator in Arrays [...$a, ...$b] PHP 8.1+
PHP 8.1+ allows the spread operator ... inside array literals to merge arrays — cleaner than array_merge() for combining arrays inline.
2mo ago php beginner
str_contains / str_starts_with / str_ends_with PHP 8.0+
PHP 8.0 added str_contains(), str_starts_with(), and str_ends_with() — replace strpos() !== false patterns with these readable alternatives.
2mo ago php beginner
SyntaxError — Parse-Time Failures ES5
SyntaxError means JavaScript couldn't parse your code — the entire script fails to execute. Common causes: missing brackets, invalid JSON, reserved word misuse.
2mo ago javascript beginner
Spread & Rest Operators ES2015
Spread (...) expands iterables into arguments or array/object literals; rest (...) collects remaining arguments into an array.
2mo ago javascript beginner
Short Open Tag (<?) PHP 5.0+
Using <? instead of <?php — short tags are disabled by default in many PHP configurations and conflict with XML processing instructions.
2mo ago php beginner
Skip Links & Bypass Blocks HTML5
Hidden links at page top letting keyboard users jump past navigation to main content — a WCAG 2.4.1 requirement.
2mo ago accessibility beginner
Diagram: Stacks Stacks PHP 5.3+
A LIFO (Last In, First Out) data structure — the last element pushed is the first popped. Used for function call stacks, undo history, expression parsing, and DFS traversal.
2mo ago data_structures beginner
String Offset Curly Brace Syntax PHP 5.0+
Using $str{0} to access string characters by index — deprecated since PHP 7.4 and removed in PHP 8.0; use square bracket syntax $str[0] instead.
2mo ago php beginner
Salted Hashing PHP 5.5+
Prepending or appending a unique random value (salt) to each password before hashing, neutralising precomputed rainbow table attacks.
CWE-759 OWASP A2:2021
2mo ago security beginner
Security Misconfiguration PHP 5.0+
Insecure default settings, unnecessary features, or missing hardening steps leave applications and infrastructure exposed.
CWE-16 OWASP A5:2021
2mo ago security beginner 7.5
Semantic HTML HTML5
Using HTML elements for their intended meaning — <article>, <nav>, <main>, <time> — improving accessibility, SEO, and code clarity.
2mo ago frontend beginner
Semantic Versioning
MAJOR.MINOR.PATCH — bump MAJOR for breaking changes, MINOR for new backwards-compatible features, PATCH for backwards-compatible bug fixes. Pre-release and build metadata extend this.
2mo ago style beginner
Semantic Versioning (SemVer) PHP 5.0+
A versioning scheme (MAJOR.MINOR.PATCH) where version numbers communicate the nature of changes to consumers.
2mo ago devops beginner
✓ schema.org compliant