← 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
Intersection & DNF Types in Practice PHP 8.1+
PHP 8.1 intersection types (A&B) and PHP 8.2 DNF types ((A&B)|null) allow precise type constraints for objects implementing multiple interfaces.
2mo ago php advanced
Integer Overflow & PHP_INT_MAX PHP 4.0+
PHP integers silently overflow to float when exceeding PHP_INT_MAX (9.2×10¹⁸ on 64-bit) — use BCMath or GMP for arbitrary precision arithmetic.
2mo ago php intermediate
include vs require vs *_once PHP 5.0+
require halts on failure; include warns and continues. The _once variants prevent double-loading — use require_once for dependencies.
2mo ago php beginner
Diagram: Interface vs Abstract Class Interface vs Abstract Class PHP 5.0+
Interfaces define pure capability contracts with no state; abstract classes add shared implementation. Use interfaces for type contracts, abstract for shared behaviour.
2mo ago php intermediate
Interfaces PHP 5.0+
Contracts that define a set of method signatures a class must implement, enabling polymorphism without inheritance.
2mo ago php intermediate
Intersection Types (PHP 8.1) PHP 8.1+
Require a value to satisfy multiple type constraints simultaneously, declared as TypeA&TypeB — useful for combining interfaces.
2mo ago php intermediate
intval() / Type Casting PHP 5.0+
Casting user input to int or float is a safe way to enforce numeric types — cheaper than regex validation for IDs.
2mo ago php beginner
Iterators & IteratorAggregate PHP 5.0+
PHP interfaces that allow custom objects to be used in foreach loops, enabling lazy and memory-efficient iteration over any data source.
2mo ago php intermediate
✓ schema.org compliant