3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // PHP <= 7.0.1 var_dump(-0.0); // float(0) var_dump(+-0.0); // float(0) var_export(0.0); // 0 // PHP >= 7.0.2 var_dump(-0.0); // float(-0) var_dump(+-0.0); // float(-0) var_export(0.0); // 0.0 var_dump(-0.0 === +0.0); var_dump(1/-0.0); sqrt(-0.0);
based on eE7dg
Output for 7.0.2 - 7.2.0
float(-0) float(-0) 0.0float(-0) float(-0) 0.0bool(true) Warning: Division by zero in /in/C8eOa on line 14 float(-INF)
Output for 7.0.0 - 7.0.1
float(0) float(0) 0float(0) float(0) 0bool(true) Warning: Division by zero in /in/C8eOa on line 14 float(INF)
Output for 5.3.21 - 5.6.28
float(0) float(0) 0float(0) float(0) 0bool(true) Warning: Division by zero in /in/C8eOa on line 14 bool(false)