3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $need_score = 248; $timestamp = 1441011021; $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 LKZSI
Output for 5.3.0 - 5.4.44, 5.6.28, 7.0.20 - 7.2.0
741.9
Output for 7.0.6
61083.1
Output for 7.0.5
53416.8
Output for 7.0.4
47728.9
Output for 7.0.3
49707.3
Output for 7.0.2
50696.5
Output for 7.0.1
50943.8
Output for 7.0.0
51685.7
Output for 5.6.21
60588.5
Output for 5.6.20
55147.9
Output for 5.6.19
46987
Output for 5.6.18
48718.1
Output for 5.6.17
49954.6
Output for 5.6.16
51933
Output for 5.6.15
52180.3
Output for 5.6.14
53169.5
Output for 5.6.13
56631.7
Output for 5.6.12
57620.9
Output for 5.6.11
58362.8
Output for 5.6.10
59104.7
Output for 5.6.9
59599.3
Output for 5.6.8
60093.9
Output for 5.5.35
65781.8
Output for 5.5.34
55395.2
Output for 5.5.33
47234.3
Output for 5.5.32
49460
Output for 5.5.31
50201.9
Output for 5.5.30
52922.2
Output for 5.5.29
56879
Output for 5.5.28
57868.2
Output for 5.5.27
58115.5
Output for 5.5.26
59352
Output for 5.5.25
59846.6
Output for 5.5.24
66029.1
Output for 5.4.45
1731.1
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::setTimestamp() in /in/L0Ku9 on line 9
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/L0Ku9 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/L0Ku9 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/L0Ku9 on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/L0Ku9 on line 10
Process exited with code 255.