1. Go to this page and download the library: Download phospr/fraction 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/ */
phospr / fraction example snippets
use Phospr\Fraction;
echo new Fraction(1, 2); // 1/2
echo new Fraction(5, 2); // 2 1/2