PHPackages                             abstract/core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. abstract/core

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

abstract/core
=============

Spec-first, language-agnostic tree processor with a PHP v0 implementation.

v0.0.3(3y ago)0152[1 PRs](https://github.com/abstract-php/core/pulls)proprietaryHTML

Since May 11Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/abstract-php/core)[ Packagist](https://packagist.org/packages/abstract/core)[ RSS](/packages/abstract-core/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Abstract
========

[](#abstract)

Abstract is a spec-first, language-agnostic tree processor. It turns structured source formats into a canonical Abstract Tree, resolves safe runtime nodes, maps that tree into a target model, and emits output such as HTML, JSX, JSON, schemas, workflows, or future custom targets.

This repository is the PHP v0 implementation. The concepts, fixtures, and docs are intentionally portable so a future JavaScript/TypeScript implementation can follow the same behavior.

Status
------

[](#status)

Abstract Core v0 currently supports:

- JSON tag-key syntax
- canonical `element`, `runtime`, `value`, and `fragment` nodes
- primitive type inference
- explicit typed nodes such as `:string`, `:int`, `:float`, `:bool`, `:null`, `:array`, and `:object`
- `@` props and `#` children
- shorthand object and array children
- `:props` and `:attributes` parent prop modifiers
- data-based `:expr`, `:if`, `:else`, and `:each`
- inline `:import` and `:include`
- DOMDocument-backed HTML and XML markup parsing
- YAML, TOML, and Pkl parsing through the shared tag-key normalizer
- compact, tagged, and canonical JSON tree export
- strict and loose runtime modes
- HTML, XML, YAML, TOML, Pkl, and JSX-like output pipelines
- target-aware custom render targets and mapper overrides
- shared JSON fixtures and PHPUnit coverage
- benchmark scripts for JSON core flows and large HTML roundtrips

Unsafe code execution is not enabled. `:php`, `:js`, `:ts`, and `:code` are recognized as payload directives, but the default strict runtime rejects them instead of executing or rendering them.

Installation
------------

[](#installation)

```
composer install
```

Quick Example
-------------

[](#quick-example)

```
