- var_dump: documentation ( source)
- ceil: documentation ( source)
- str_pad: documentation ( source)
<?php
$width = 2034;
$height = 847;
bcscale(5);
$fig = (int) str_pad('1', 4, '0');
$ratio = (ceil(bcdiv(bcdiv(1200, bcdiv($width, 100)) , 100) * $fig) / $fig);
var_dump($ratio);
$newWidth = bcmul($width, $ratio);
$newHeight = bcmul($height, $ratio);
var_dump($newWidth);
var_dump($newHeight);