3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $ratio = 1.583333333; $width = 960; $image_width = 3840; $image_height = 2560; $image_ratio = $image_width / $image_height; $width = ($image_ratio > $ratio) ? 9999 : $width; $height = ($image_ratio > $ratio) ? $width / $ratio : 9999; echo 'width:' . $width . ' / height:' . $height;
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
width:960 / height:9999