<?php
function ex_round($_,$__ = 1){
if(0== round($_, $__, PHP_ROUND_HALF_EVEN)){
return ex_round($_,$__+1)
}
return round($_, $__, PHP_ROUND_HALF_EVEN);
}
echo ex_round(0.005);
echo PHP_EOL;
echo round(0.005, 1, PHP_ROUND_HALF_ODD);
- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25
- Parse error: syntax error, unexpected '}' in /in/gCiS2 on line 5
Process exited with code 255.
preferences:
190.89 ms | 1395 KiB | 62 Q