3v4l.org

run code in 200+ 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) ? $image_width / $image_ratio : $width; $height = $width * $image_ratio; echo 'width:' . $width . ' / height:' . $height;
Output for 4.3.0 - 7.1.10
width:960 / height:1440