mercurysolutions/mathml
A Laravel package for working with MathML, making it easy to render mathematical notation and equations in your PHP applications. Integrates cleanly with Blade views for displaying math content.
Consider it when:
<apply>, <ci>, <cn> structures), not Presentation MathML.eval(), or building a parser from scratch.Look elsewhere when:
To executives: This is a small, free PHP library for reading and calculating math formulas written in MathML. It could unlock math-heavy features — auto-graded equations, formula validation, publisher content ingestion — without buying a commercial math engine or standing up a new service. The trade-off is maturity: it's a single-maintainer project with almost no adoption, so we'd treat it as a time-boxed technical spike, not a committed dependency. Cost to evaluate is low; cost to adopt blindly is maintenance and reliability risk.
To engineering: The package parses Content MathML into a PHP object model and evaluates it. It's useful as a reference implementation or a starting point we can vendor and harden. Before adoption we need to confirm: supported operator coverage, behavior on malformed or adversarial input, numeric precision, and test coverage. Recommend a spike behind an interface (e.g., MathExpressionEvaluator) so we can swap in a service-based CAS later without touching product code. If the spike passes, fork it, pin it, and add our own tests; if not, the interface still stands and we've de-risked the build-vs-buy decision.
How can I help you explore Laravel packages today?