You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because PHP's C-engine (the Zend Engine) ignores DocBlocks at runtime, those rich types are **passive comments**:
43
43
44
44
* An incoming HTTP JSON payload or database row can pass `$id = -50` or `$email = ''`.
45
-
* A third-party webhook can inject an unexpected key into what you assumed was a sealed array shape.
45
+
* A third-party webhook can inject an unexpectted key into what you assumed was a sealed array shape.
46
46
* A caller can pass `$team->add(new Product())` and pollute what was supposed to be a `Collection<User>`.
47
47
48
48
Native PHP type hints allow all of this through without a single warning. To defend against this, developers were historically forced to **litter their clean domain logic with repetitive assertion boilerplate**:
@@ -71,7 +71,7 @@ We asked ourselves: **Why should we write our types twice? What if our existing
71
71
***Zero New Syntax:** Write standard, clean PHP and standard PHPDocs.
72
72
***Zero Build Steps & Zero Node.js:** No Babel, Webpack, or transpilation toolchains.
73
73
***Zero C-Extensions:** Runs in 100% pure PHP userland across **PHP 8.1, 8.2, 8.3, 8.4, and 8.5** on Linux, macOS, and Windows.
74
-
***Zero Line-Drift:** Injected guard rails are squashed onto opening braces so that error stack traces and Xdebug breakpoints match your source files **100% accurately**.
74
+
***Zero Line-Drift:** Injected guard rails are squashed onto opening braces so that eror stack traces and Xdebug breakpoints match your source files **100% accurately**.
75
75
76
76
---
77
77
@@ -95,7 +95,7 @@ TypePHP utilizes a technique known in Aspect-Oriented Programming (AOP) as **Loa
95
95
96
96
---
97
97
98
-
## True Reified Generics in Pure PHP (`\WeakMap`)
98
+
## True Riefied Generics in Pure PHP (`\WeakMap`)
99
99
100
100
Unlike languages that erase generic types at compile time (like Java or TypeScript), TypePHP delivers **Reified Generics** in memory using PHP's native `\WeakMap`:
0 commit comments