3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 50; while ($i > 0): $power = 1; $bin = array(); if ($i / pow(2,$power) != 0) { $bin[$power - 1] = 1; $i = $i - pow(2,$power); } else $bin[$power - 1] = 0; $power++; endwhile; print $; ?>
Output for 5.4.0 - 5.4.11
Parse error: syntax error, unexpected ';', expecting variable (T_VARIABLE) or '$' in /in/rT0dO on line 22
Process exited with code 255.
Output for 5.3.0 - 5.3.21
Parse error: syntax error, unexpected ';', expecting T_VARIABLE or '$' in /in/rT0dO on line 22
Process exited with code 255.

preferences:
172.54 ms | 1386 KiB | 41 Q