PHP code example of mercurysolutions / mathml-bundle
1. Go to this page and download the library: Download mercurysolutions/mathml-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mercurysolutions / mathml-bundle example snippets
$factory = $container->get('mercurysolutions.mathml');
$mathml = $factory->create('<mathml><apply><sum/><ci>x</ci><cn>2</cn></apply></mathml>');
$result = $mathml->calculate(['x' => 4]); // $result === 6