Round up decimal number according to fraction in PHP
<p>I am working to convert an excel formula to php function. Now I am facing a problem that is round up as the fraction. Please let me explain it:</p>

<blockquote>
  <ul>
  <li>(2 * 18)/2.98 = 12.08 but according to my requirement it should be 12.25
  
  <ul>
  <li>(2 * 18.5)/2.98 = 12.416 but according to my requirement it should be 12.50</li>
  <li>(2 * 18.8)/2.98 = 12.617 but according to my requirement it should be 12.75</li>
  </ul></li>
  </ul>
</blockquote>

<p>In excel, it is done like :</p>

<blockquote>
  <ul>
  <li>ceiling(( 2 * 18 )/2.98,  0.25) = 12.25
  
  <ul>
  <li>ceiling(( 2 * 18.5 )/2.98,  0.25) = 12.50</li>
  <li>ceiling(( 2 * 18.8 )/2.98,  0.25) = 12.75</li>
  </ul></li>
  </ul>
</blockquote>

<p>I tried in PHP. Ceil() and Floor() do not serve the purpose as these 2 shall give output 13 and 12 accordingly.</p>

<p>Another one round() uses these options <code>PHP_ROUND_HALF_UP, PHP_ROUND_HALF_DOWN, PHP_ROUND_HALF_EVEN, or PHP_ROUND_HALF_ODD</code> which does not serve the purpose.</p>

<p>Anyone there to help me?</p>