trismegiste/wam-prolog
A Prolog engine for PHP built on the Warren Abstract Machine, letting you embed logic programming and rule-based reasoning directly in your PHP applications.
if statements.Consider it when:
if/then rules that a small PHP library already covers.Look elsewhere when:
To executives: This is a free, open-source PHP component that lets us prototype logic-heavy features — eligibility rules, compliance checks, scheduling — without buying a rules platform or adding infrastructure. The cost to try it is a few engineering days and no licensing spend. The caveat is maturity: it's a niche project with a single maintainer and essentially no production users, so I'm recommending it as a time-boxed spike to inform a build-vs-buy decision, not as a platform dependency. If the spike succeeds, we either vendor the code or budget for a mature alternative; either way we'll have real data instead of a guess.
To engineering: Composer-installable pure-PHP implementation of a Warren Abstract Machine — real Prolog (unification, backtracking, cut) running in-process, no JVM, no sidecar. It is not Laravel-aware, so assume you write the service provider and config yourself. Two things to validate in the spike: (1) performance on a representative fact base at realistic rule depth, and (2) maintainability — can the team read and debug the engine when rules misbehave. If we adopt, wrap it behind our own interface so we can swap in SWI-Prolog or a rules library without touching call sites, and vendor/fork it rather than depending on upstream for fixes.
How can I help you explore Laravel packages today?