3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $base = 2; $num = 23; while( $num > 1) { $arr[] = $num % $base; // store remainder in array $num = floor($num/$base); // no integer division var_dump($arr,$num); }
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
array(1) { [0]=> int(1) } float(11) array(2) { [0]=> int(1) [1]=> int(1) } float(5) array(3) { [0]=> int(1) [1]=> int(1) [2]=> int(1) } float(2) array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(0) } float(1)
Output for hhvm-3.10.0

Process exited with code 153.