Note
The two flagships are Story 08 — the type checker (the correctness engine on the spine) and Story 16 — parsable lambdas / expression trees (the marquee feature that enables LINQ-style query builders and ORMs).
Tier 3 · Story 30Complete
Tyhp is built in a deliberately ordered sequence of stories, grouped into four tiers. The guiding principle is a thin vertical slice that compiles and runs end-to-end as early as possible.
This beta (805.1.2-beta.4) completes Tiers 0–2, apart from the deferred web playground (Story 22). Tier 3 is next. Features listed under Tier 3 and Future Plans are not in this beta.
Stories are numbered contiguously from 01 to 30 with additive sub-stories (08.5, 10.5, 14.5, 16.5, 19.5, 20.5, 24.1, 27.1, 27.2, 27.3). Each documentation page carries a Tier/Story badge.
The two flagships are Story 08 — the type checker (the correctness engine on the spine) and Story 16 — parsable lambdas / expression trees (the marquee feature that enables LINQ-style query builders and ORMs).
__ClassName, template string types, …).805.0.0).__CallableParametersStruct / __CallableParametersTuple / __CallableReturnType).generate_tyhpdef and package.tyhpdef on tyhp build shipped, plus --php-targets gated emit).declare(php=…) / #[\Tyhp\Php]).tyhpdef/php + tyhpdef/php-ext-*; one package per extension across 8.2–8.5 with declare(php=…) / #[\Tyhp\Php] gates). Includes the built-in scalar method catalog ($name->toUpper(), …) via global use extension \Tyhp\StringExtensions.__New<T> (shipped).type Name = struct { }; (shipped).extension Name extends Type; shipped).Promise::from, optional wrapper packages for ReactPHP, Amp, Guzzle, and HTTP promise interfaces, and an option to run on the ReactPHP or Revolt event loop instead of Tyhp's.internal project-boundary enforcement and the internals overlay (includeInternals) (the modifier itself already hides symbols from published package.tyhpdef; see The internal Visibility Modifier).Story 28 (generic defaults) shipped with the alpha; see Tier 1 above.
These ideas are planned after Tier 3. None has a release target yet, and their order depends on feedback.
T extends X ? A : B, a match (T) { … } form for multi-way cases, and flag-presence checks for bitmask arguments such as JSON_THROW_ON_ERROR. Overloads become shorthand for the same checker model. A later version adds infer, opt-in distribution over unions, and recursive conditional types.opcache.preload, a Tyhp loader, then Composer PSR-4) that uses the checker's type graph to load code faster than Composer autoloading alone.use a trait so every implementing class gets it.int, float, bool, and decimal, the way \Stringable works for string.operator default(): a class declares the value default(MyClass) produces.tyhpdef/php and runtime package tyhpdefs.Compiled Tyhp code depends on Composer packages under the tyhp/ and tyhpdef/ vendors. See Runtime Packages Overview.
tyhp/core — type-system support, generics, typed variables, scalar methods, property accessors, and disposable interfacestyhp/async — Promise<T>, event loop, cancellation tokens, deferred execution, and async iteratorstyhp/decimal — the decimal type with operator-overload support for precise arithmetictyhp/lambda — expression-tree nodes, visitors, and serialization for parsable lambdastyhp/io — non-blocking I/O on the async event looptyhp/parallel — worker processes for CPU-heavy or blocking worktyhp/compiler — Composer shim that installs and runs the compilertyhpdef/php — PHP builtin tyhpdefs for PHP 8.2–8.5, plus tyhpdef/php-ext-* packages for extensionsTyhp's long-term goal is a typed superset of the PHP language in the same role TypeScript has for JavaScript: compile-time types, readable PHP output, and use of the existing PHP runtime and ecosystem.