3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

preferences:
40.61 ms | 402 KiB | 5 Q