3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $uptime = round((100-($server_data['down'] / $server_data['up'])*100),2); if ($uptime < 0) $uptime = 0; echo $uptime;
Output for hhvm-3.11.1 - 3.21.3, 7.0.0 - 7.2.12
Notice: Undefined variable: server_data in /in/c8QuP on line 2 Notice: Undefined variable: server_data in /in/c8QuP on line 2 Warning: Division by zero in /in/c8QuP on line 2 NAN
Output for hhvm-3.22.0
Notice: Undefined variable: server_data in /in/c8QuP on line -1 Notice: Undefined variable: server_data in /in/c8QuP on line -1 Warning: Division by zero in /in/c8QuP on line -1 NAN
Output for 5.0.4 - 5.6.38, hhvm-3.10.1
Notice: Undefined variable: server_data in /in/c8QuP on line 2 Notice: Undefined variable: server_data in /in/c8QuP on line 2 Warning: Division by zero in /in/c8QuP on line 2 100
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: server_data in /in/c8QuP on line 2 Notice: Undefined variable: server_data in /in/c8QuP on line 2 Warning: Division by zero in /in/c8QuP on line 2 100