3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $head=<<<EOF 943.375/h(ordinary) 1179.84375/h(extra) 58.5331744139849=3511.990464839094m =?=3512m =58h32m which means...\n\n EOF; echo $head; $bsalary=150940; echo "月俸:$bsalary\n"; $ex_inc=69060; echo "見込み残業:$ex_inc \n"; $hsalary=ceil(BSALARY/160)-1; echo "時間換算基本給:{$hsalary}円\n"; $ex_hsal=ceil($hsalary*1.25); echo "残業時時給:$ex_hsal\n"; $capableextra=ceil($ex_inc / $ex_hsal); echo "残業可能時間:{$capableextra}\n"; $total=160+$capableextra; echo "月稼働時間は{$total}\n"; $tperday=ceil($total/20); $dailyextra=tperday-8; echo "一日{$tperday}労働、平均残業{$dailyextra}時間";
based on JbdVP
Output for 7.1.0
943.375/h(ordinary) 1179.84375/h(extra) 58.5331744139849=3511.990464839094m =?=3512m =58h32m which means... 月俸:150940 見込み残業:69060 Notice: Use of undefined constant BSALARY - assumed 'BSALARY' in /in/QAe2X on line 14 Warning: A non-numeric value encountered in /in/QAe2X on line 14 時間換算基本給:-1円 残業時時給:-1 残業可能時間:-69060 月稼働時間は-68900 Notice: Use of undefined constant tperday - assumed 'tperday' in /in/QAe2X on line 24 Warning: A non-numeric value encountered in /in/QAe2X on line 24 一日-3445労働、平均残業-8時間
Output for 4.3.0 - 4.4.1, 4.4.3 - 5.1.1, 5.1.3 - 7.0.14
943.375/h(ordinary) 1179.84375/h(extra) 58.5331744139849=3511.990464839094m =?=3512m =58h32m which means... 月俸:150940 見込み残業:69060 Notice: Use of undefined constant BSALARY - assumed 'BSALARY' in /in/QAe2X on line 14 時間換算基本給:-1円 残業時時給:-1 残業可能時間:-69060 月稼働時間は-68900 Notice: Use of undefined constant tperday - assumed 'tperday' in /in/QAe2X on line 24 一日-3445労働、平均残業-8時間
Output for 4.4.2, 5.1.2
943.375/h(ordinary) 1179.84375/h(extra) 58.5331744139849=3511.990464839094m =?=3512m =58h32m which means... 月俸:150940 見込み残業:69060 Notice: Use of undefined constant BSALARY - assumed 'BSALARY' in /in/QAe2X on line 15 時間換算基本給:-1円 残業時時給:-1 残業可能時間:-69060 月稼働時間は-68900 Notice: Use of undefined constant tperday - assumed 'tperday' in /in/QAe2X on line 25 一日-3445労働、平均残業-8時間