3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('PRIORITY_INQUIRER_OBJECT', 45); define('PRIORITY_INQUIRER_QUESTION', 45); $sum = 100; $object = (int) (round(PRIORITY_INQUIRER_OBJECT / $sum, 1) * 100); $question = (int) (round(PRIORITY_INQUIRER_QUESTION / $sum, 1) * 100); $commercial = (int) (100 - ($question + $object)); var_dump($object, $question, $commercial);
Output for 4.3.0 - 7.1.0
int(50) int(50) int(0)