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
{{ message }}
Repository navigation
Commit 8629bbe
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/index.md
+17-18Lines changed: 17 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,33 +4,33 @@ layout: home
4
4
hero:
5
5
name: "TypePHP"
6
6
text: "Transparent Runtime Type Enforcement"
7
-
tagline: "No transpilation. No build steps. No C-extensions. Just 100% pure PHP that makes your existing DocBlocks scream the moment types fail."
7
+
tagline: "The first pure userland PHP library to transparently enforce DocBlock types at runtime. Bringing reified generics, typed arrays, and static analysis type refinements to life with zero new syntax, zero build steps, and zero C-extensions."
8
8
actions:
9
9
- theme: brand
10
10
text: "Get Started →"
11
11
link: /getting-started/installation
12
12
- theme: alt
13
13
text: "View on GitHub"
14
-
link: https://github.com/typephp-php/docs
14
+
link: https://github.com/typephp-php/typephp
15
15
16
16
features:
17
-
- title: "Zero Production Overhead"
18
-
details: "Install as a development dependency to enforce strict types during local testing and CI/CD pipelines, guaranteeing absolute zero performance cost in live production environments."
19
-
- title: "No Transpilation or C-Extensions"
20
-
details: "Operates 100% in pure PHP user-land using native stream wrappers and AST transformations. No build scripts, Node.js tools, or C-extensions required."
21
-
- title: "True Runtime Generics"
22
-
details: "Binds generic template types to specific object instances dynamically using native WeakMap memory tracking."
23
-
- title: "Arrays, Shapes & Extractions"
24
-
details: "Deeply validates sequential lists, typed arrays, array shapes, and key-of / value-of constant extractions out of the box."
17
+
- title: "First-of-its-Kind in Userland"
18
+
details: "Operates 100% in pure PHP userland via native stream wrappers and AST transformations. No custom PHP binaries, C-extensions, FFI, or build steps required."
19
+
- title: "True Reified Generics"
20
+
details: "The only PHP engine that statefully reifies generic templates per object instance in memory using native WeakMap tracking, with full support for variance, nested generics, upper bounds, and clone preservation."
21
+
- title: "Advanced Type Enhancements"
22
+
details: "Enforces typed arrays, sequential lists, array shapes, DNF, scalar refinements , and key-of / value-of extractions live at runtime."
23
+
- title: "Zero Line-Drift & Total Compatibility"
24
+
details: "100% drop-in compatible with any existing PHP 8.1+ codebase (Laravel, Symfony, Shopware). Error traces in Ignition, Symfony, and Pest highlight the exact source line without drift."
25
25
---
26
26
27
-
::: tip Pure PHP • Zero Transpilation • Zero Build Steps
28
-
**You don't have to change a single line of code, and you don't need a compilation build toolchain.** TypePHP operates entirely in native PHP user-land and no custom PHP binaries, C-extensions, or Node.js transpilers needed. Drop TypePHP into your existing project, run your code, and your DocBlocks will instantly start screaming at runtime when dynamic data violates a type contract.
27
+
::: tip The First Pure Userland Runtime Contract Engine for PHP
28
+
**You don't have to refactor a single line of code, learn new syntax, or compile C-extensions.** TypePHP bridges the gap between static analysis and runtime execution. Drop TypePHP into your existing project, and your PHPStan and Psalm DocBlocks will immediately start enforcing reified generics, typed arrays, and shape contracts the moment your code runs.
29
29
:::
30
30
31
31
## See It In Action
32
32
33
-
TypePHP operates entirely in user-land using native stream wrappers and AST transformations. Because it requires no C-extensions or FFI, you can drop it into any PHP 8.1+ project or web framework effortlessly. It reads your existing PHPDoc annotations and enforces them the moment your code runs.
33
+
TypePHP operates entirely in userland using native stream wrappers and AST transformations. Because it requires no C-extensions or FFI, you can drop it into any PHP 8.1+ project or web framework effortlessly. It reads your existing PHPDoc annotations and enforces them the moment your code runs.
A common problem with AST code injection is that adding new statements pushes subsequent code down, causing line numbers in stack traces to drift out of sync.
129
129
@@ -139,4 +139,3 @@ When a type contract fails, web exception handlers (**Laravel Ignition, Whoops,
0 commit comments