3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $need_score = 234; $timestamp = 1417763475; $current_score = 0.7; $date_now = new DateTime(); $date = new DateTime(); $date->setTimestamp($timestamp); $interval_days = $date_now->diff($date)->days + 1; print ($need_score - $current_score) * $interval_days;
based on afCkP
Output for 5.3.0 - 5.4.44, 5.6.28, 7.0.20 - 7.2.0
63457.6
Output for 7.0.6
120382.8
Output for 7.0.5
113150.5
Output for 7.0.4
107784.6
Output for 7.0.3
109651
Output for 7.0.2
110584.2
Output for 7.0.1
110817.5
Output for 7.0.0
111517.4
Output for 5.6.21
120149.5
Output for 5.6.20
114783.6
Output for 5.6.19
107084.7
Output for 5.6.18
108717.8
Output for 5.6.17
109884.3
Output for 5.6.16
111750.7
Output for 5.6.15
111984
Output for 5.6.14
112917.2
Output for 5.6.13
116183.4
Output for 5.6.12
117116.6
Output for 5.6.11
118049.8
Output for 5.6.10
118516.4
Output for 5.6.9
118983
Output for 5.6.8
119449.6
Output for 5.5.35
124815.5
Output for 5.5.34
115016.9
Output for 5.5.33
107318
Output for 5.5.32
109417.7
Output for 5.5.31
110117.6
Output for 5.5.30
112683.9
Output for 5.5.29
116416.7
Output for 5.5.28
117349.9
Output for 5.5.27
117583.2
Output for 5.5.26
118749.7
Output for 5.5.25
119216.3
Output for 5.5.24
125048.8
Output for 5.4.45
64390.8
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::setTimestamp() in /in/Wfjcn on line 9
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/Wfjcn on line 7
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/Wfjcn on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/Wfjcn on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Wfjcn on line 10
Process exited with code 255.