3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $size = 9; $center = ceil($size/2); for ($i=0; $i<$size; $i++) { $post = abs($center + $i - $size); var_dump($post); }
Output for 4.3.0 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
float(4) float(3) float(2) float(1) float(0) float(1) float(2) float(3) float(4)