3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for($i=0; $i< 1000;$i++){ echo $i .' - '.decbin($i) . '\n'; }
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
0 - 0\n1 - 1\n2 - 10\n3 - 11\n4 - 100\n5 - 101\n6 - 110\n7 - 111\n8 - 1000\n9 - 1001\n10 - 1010\n11 - 1011\n12 - 1100\n13 - 1101\n14 - 1110\n15 - 1111\n16 - 10000\n17 - 10001\n18 - 10010\n19 - 10011\n20 - 10100\n21 - 10101\n22 - 10110\n23 - 10111\n24 - 11000\n25 - 11001\n26 - 11010\n27 - 11011\n28 - 11100\n29 - 11101\n30 - 11110\n31 - 11111\n32 - 100000\n33 - 100001\n34 - 100010\n35 - 100011\n36 - 100100\n37 - 100101\n38 - 100110\n39 - 100111\n40 - 101000\n41 - 101001\n42 - 101010\n43 - 101011\n44 - 101100\n45 - 101101\n46 - 101110\n47 - 101111\n48 - 110000\n49 - 110001\n50 - 110010\n51 - 110011\n52 - 110100\n53 - 110101\n54 - 110110\n55 - 110111\n56 - 111000\n57 - 111001\n58 - 111010\n59 - 111011\n60 - 111100\n61 - 111101\n62 - 111110\n63 - 111111\n64 - 1000000\n65 - 1000001\n66 - 1000010\n67 - 1000011\n68 - 1000100\n69 - 1000101\n70 - 1000110\n71 - 1000111\n72 - 1001000\n73 - 1001001\n74 - 1001010\n75 - 1001011\n76 - 1001100\n77 - 1001101\n78 - 1001110\n79 - 1001111\n80 - 1010000\n81 - 1010001\n82 - 1010010\n83 - 1010011\n84 - 1010100\n85 - 1010101\n86 - 1010110\n87 - 1010111\n88 - 1011000\n89 - 1011001\n90 - 1011010\n91 - 1011011\n92 - 1011100\n93 - 1011101\n94 - 1011110\n95 - 1011111\n96 - 1100000\n97 - 1100001\n98 - 1100010\n99 - 1100011\n100 - 1100100\n101 - 1100101\n102 - 1100110\n103 - 1100111\n104 - 1101000\n105 - 1101001\n106 - 1101010\n107 - 1101011\n108 - 1101100\n109 - 1101101\n110 - 1101110\n111 - 1101111\n112 - 1110000\n113 - 1110001\n114 - 1110010\n115 - 1110011\n116 - 1110100\n117 - 1110101\n118 - 1110110\n119 - 1110111\n120 - 1111000\n121 - 1111001\n122 - 1111010\n123 - 1111011\n124 - 1111100\n125 - 1111101\n126 - 1111110\n127 - 1111111\n128 - 10000000\n129 - 10000001\n130 - 10000010\n131 - 10000011\n132 - 10000100\n133 - 10000101\n134 - 10000110\n135 - 10000111\n136 - 10001000\n137 - 10001001\n138 - 10001010\n139 - 10001011\n140 - 10001100\n141 - 10001101\n142 - 10001110\n143 - 10001111\n144 - 10010000\n145 - 10010001\n146 - 10010010\n147 - 10010011\n148 - 10010100\n149 - 10010101\n150 - 10010110\n151 - 10010111\n152 - 10011000\n153 - 10011001\n154 - 10011010\n155 - 10011011\n156 - 10011100\n157 - 10011101\n158 - 10011110\n159 - 10011111\n160 - 10100000\n161 - 10100001\n162 - 10100010\n163 - 10100011\n164 - 10100100\n165 - 10100101\n166 - 10100110\n167 - 10100111\n168 - 10101000\n169 - 10101001\n170 - 10101010\n171 - 10101011\n172 - 10101100\n173 - 10101101\n174 - 10101110\n175 - 10101111\n176 - 10110000\n177 - 10110001\n178 - 10110010\n179 - 10110011\n180 - 10110100\n181 - 10110101\n182 - 10110110\n183 - 10110111\n184 - 10111000\n185 - 10111001\n186 - 10111010\n187 - 10111011\n188 - 10111100\n189 - 10111101\n190 - 10111110\n191 - 10111111\n192 - 11000000\n193 - 11000001\n194 - 11000010\n195 - 11000011\n196 - 11000100\n197 - 11000101\n198 - 11000110\n199 - 11000111\n200 - 11001000\n201 - 11001001\n202 - 11001010\n203 - 11001011\n204 - 11001100\n205 - 11001101\n206 - 11001110\n207 - 11001111\n208 - 11010000\n209 - 11010001\n210 - 11010010\n211 - 11010011\n212 - 11010100\n213 - 11010101\n214 - 11010110\n215 - 11010111\n216 - 11011000\n217 - 11011001\n218 - 11011010\n219 - 11011011\n220 - 11011100\n221 - 11011101\n222 - 11011110\n223 - 11011111\n224 - 11100000\n225 - 11100001\n226 - 11100010\n227 - 11100011\n228 - 11100100\n229 - 11100101\n230 - 11100110\n231 - 11100111\n232 - 11101000\n233 - 11101001\n234 - 11101010\n235 - 11101011\n236 - 11101100\n237 - 11101101\n238 - 11101110\n239 - 11101111\n240 - 11110000\n241 - 11110001\n242 - 11110010\n243 - 11110011\n244 - 11110100\n245 - 11110101\n246 - 11110110\n247 - 11110111\n248 - 11111000\n249 - 11111001\n250 - 11111010\n251 - 11111011\n252 - 11111100\n253 - 11111101\n254 - 11111110\n255 - 11111111\n256 - 100000000\n257 - 100000001\n258 - 100000010\n259 - 100000011\n260 - 100000100\n261 - 100000101\n262 - 100000110\n263 - 100000111\n264 - 100001000\n265 - 100001001\n266 - 100001010\n267 - 100001011\n268 - 100001100\n269 - 100001101\n270 - 100001110\n271 - 100001111\n272 - 100010000\n273 - 100010001\n274 - 100010010\n275 - 100010011\n276 - 100010100\n277 - 100010101\n278 - 100010110\n279 - 100010111\n280 - 100011000\n281 - 100011001\n282 - 100011010\n283 - 100011011\n284 - 100011100\n285 - 100011101\n286 - 100011110\n287 - 100011111\n288 - 100100000\n289 - 100100001\n290 - 100100010\n291 - 100100011\n292 - 100100100\n293 - 100100101\n294 - 100100110\n295 - 100100111\n296 - 100101000\n297 - 100101001\n298 - 100101010\n299 - 100101011\n300 - 100101100\n301 - 100101101\n302 - 100101110\n303 - 100101111\n304 - 100110000\n305 - 100110001\n306 - 100110010\n307 - 100110011\n308 - 100110100\n309 - 100110101\n310 - 100110110\n311 - 100110111\n312 - 100111000\n313 - 100111001\n314 - 100111010\n315 - 100111011\n316 - 100111100\n317 - 100111101\n318 - 100111110\n319 - 100111111\n320 - 101000000\n321 - 101000001\n322 - 101000010\n323 - 101000011\n324 - 101000100\n325 - 101000101\n326 - 101000110\n327 - 101000111\n328 - 101001000\n329 - 101001001\n330 - 101001010\n331 - 101001011\n332 - 101001100\n333 - 101001101\n334 - 101001110\n335 - 101001111\n336 - 101010000\n337 - 101010001\n338 - 101010010\n339 - 101010011\n340 - 101010100\n341 - 101010101\n342 - 101010110\n343 - 101010111\n344 - 101011000\n345 - 101011001\n346 - 101011010\n347 - 101011011\n348 - 101011100\n349 - 101011101\n350 - 101011110\n351 - 101011111\n352 - 101100000\n353 - 101100001\n354 - 101100010\n355 - 101100011\n356 - 101100100\n357 - 101100101\n358 - 101100110\n359 - 101100111\n360 - 101101000\n361 - 101101001\n362 - 101101010\n363 - 101101011\n364 - 101101100\n365 - 101101101\n366 - 101101110\n367 - 101101111\n368 - 101110000\n369 - 101110001\n370 - 101110010\n371 - 101110011\n372 - 101110100\n373 - 101110101\n374 - 101110110\n375 - 101110111\n376 - 101111000\n377 - 101111001\n378 - 101111010\n379 - 101111011\n380 - 101111100\n381 - 101111101\n382 - 101111110\n383 - 101111111\n384 - 110000000\n385 - 110000001\n386 - 110000010\n387 - 110000011\n388 - 110000100\n389 - 110000101\n390 - 110000110\n391 - 110000111\n392 - 110001000\n393 - 110001001\n394 - 110001010\n395 - 110001011\n396 - 110001100\n397 - 110001101\n398 - 110001110\n399 - 110001111\n400 - 110010000\n401 - 110010001\n402 - 110010010\n403 - 110010011\n404 - 110010100\n405 - 110010101\n406 - 110010110\n407 - 110010111\n408 - 110011000\n409 - 110011001\n410 - 110011010\n411 - 110011011\n412 - 110011100\n413 - 110011101\n414 - 110011110\n415 - 110011111\n416 - 110100000\n417 - 110100001\n418 - 110100010\n419 - 110100011\n420 - 110100100\n421 - 110100101\n422 - 110100110\n423 - 110100111\n424 - 110101000\n425 - 110101001\n426 - 110101010\n427 - 110101011\n428 - 110101100\n429 - 110101101\n430 - 110101110\n431 - 110101111\n432 - 110110000\n433 - 110110001\n434 - 110110010\n435 - 110110011\n436 - 110110100\n437 - 110110101\n438 - 110110110\n439 - 110110111\n440 - 110111000\n441 - 110111001\n442 - 110111010\n443 - 110111011\n444 - 110111100\n445 - 110111101\n446 - 110111110\n447 - 110111111\n448 - 111000000\n449 - 111000001\n450 - 111000010\n451 - 111000011\n452 - 111000100\n453 - 111000101\n454 - 111000110\n455 - 111000111\n456 - 111001000\n457 - 111001001\n458 - 111001010\n459 - 111001011\n460 - 111001100\n461 - 111001101\n462 - 111001110\n463 - 111001111\n464 - 111010000\n465 - 111010001\n466 - 111010010\n467 - 111010011\n468 - 111010100\n469 - 111010101\n470 - 111010110\n471 - 111010111\n472 - 111011000\n473 - 111011001\n474 - 111011010\n475 - 111011011\n476 - 111011100\n477 - 111011101\n478 - 111011110\n479 - 111011111\n480 - 111100000\n481 - 111100001\n482 - 111100010\n483 - 111100011\n484 - 111100100\n485 - 111100101\n486 - 111100110\n487 - 111100111\n488 - 111101000\n489 - 111101001\n490 - 111101010\n491 - 111101011\n492 - 111101100\n493 - 111101101\n494 - 111101110\n495 - 111101111\n496 - 111110000\n497 - 111110001\n498 - 111110010\n499 - 111110011\n500 - 111110100\n501 - 111110101\n502 - 111110110\n503 - 111110111\n504 - 111111000\n505 - 111111001\n506 - 111111010\n507 - 111111011\n508 - 111111100\n509 - 111111101\n510 - 111111110\n511 - 111111111\n512 - 1000000000\n513 - 1000000001\n514 - 1000000010\n515 - 1000000011\n516 - 1000000100\n517 - 1000000101\n518 - 1000000110\n519 - 1000000111\n520 - 1000001000\n521 - 1000001001\n522 - 1000001010\n523 - 1000001011\n524 - 1000001100\n525 - 1000001101\n526 - 1000001110\n527 - 1000001111\n528 - 1000010000\n529 - 1000010001\n530 - 1000010010\n531 - 1000010011\n532 - 1000010100\n533 - 1000010101\n534 - 1000010110\n535 - 1000010111\n536 - 1000011000\n537 - 1000011001\n538 - 1000011010\n539 - 1000011011\n540 - 1000011100\n541 - 1000011101\n542 - 1000011110\n543 - 1000011111\n544 - 1000100000\n545 - 1000100001\n546 - 1000100010\n547 - 1000100011\n548 - 1000100100\n549 - 1000100101\n550 - 1000100110\n551 - 1000100111\n552 - 1000101000\n553 - 1000101001\n554 - 1000101010\n555 - 1000101011\n556 - 1000101100\n557 - 1000101101\n558 - 1000101110\n559 - 1000101111\n560 - 1000110000\n561 - 1000110001\n562 - 1000110010\n563 - 1000110011\n564 - 1000110100\n565 - 1000110101\n566 - 1000110110\n567 - 1000110111\n568 - 1000111000\n569 - 1000111001\n570 - 1000111010\n571 - 1000111011\n572 - 1000111100\n573 - 1000111101\n574 - 1000111110\n575 - 1000111111\n576 - 1001000000\n577 - 1001000001\n578 - 1001000010\n579 - 1001000011\n580 - 1001000100\n581 - 1001000101\n582 - 1001000110\n583 - 1001000111\n584 - 1001001000\n585 - 1001001001\n586 - 1001001010\n587 - 1001001011\n588 - 1001001100\n589 - 1001001101\n590 - 1001001110\n591 - 1001001111\n592 - 1001010000\n593 - 1001010001\n594 - 1001010010\n595 - 1001010011\n596 - 1001010100\n597 - 1001010101\n598 - 1001010110\n599 - 1001010111\n600 - 1001011000\n601 - 1001011001\n602 - 1001011010\n603 - 1001011011\n604 - 1001011100\n605 - 1001011101\n606 - 1001011110\n607 - 1001011111\n608 - 1001100000\n609 - 1001100001\n610 - 1001100010\n611 - 1001100011\n612 - 1001100100\n613 - 1001100101\n614 - 1001100110\n615 - 1001100111\n616 - 1001101000\n617 - 1001101001\n618 - 1001101010\n619 - 1001101011\n620 - 1001101100\n621 - 1001101101\n622 - 1001101110\n623 - 1001101111\n624 - 1001110000\n625 - 1001110001\n626 - 1001110010\n627 - 1001110011\n628 - 1001110100\n629 - 1001110101\n630 - 1001110110\n631 - 1001110111\n632 - 1001111000\n633 - 1001111001\n634 - 1001111010\n635 - 1001111011\n636 - 1001111100\n637 - 1001111101\n638 - 1001111110\n639 - 1001111111\n640 - 1010000000\n641 - 1010000001\n642 - 1010000010\n643 - 1010000011\n644 - 1010000100\n645 - 1010000101\n646 - 1010000110\n647 - 1010000111\n648 - 1010001000\n649 - 1010001001\n650 - 1010001010\n651 - 1010001011\n652 - 1010001100\n653 - 1010001101\n654 - 1010001110\n655 - 1010001111\n656 - 1010010000\n657 - 1010010001\n658 - 1010010010\n659 - 1010010011\n660 - 1010010100\n661 - 1010010101\n662 - 1010010110\n663 - 1010010111\n664 - 1010011000\n665 - 1010011001\n666 - 1010011010\n667 - 1010011011\n668 - 1010011100\n669 - 1010011101\n670 - 1010011110\n671 - 1010011111\n672 - 1010100000\n673 - 1010100001\n674 - 1010100010\n675 - 1010100011\n676 - 1010100100\n677 - 1010100101\n678 - 1010100110\n679 - 1010100111\n680 - 1010101000\n681 - 1010101001\n682 - 1010101010\n683 - 1010101011\n684 - 1010101100\n685 - 1010101101\n686 - 1010101110\n687 - 1010101111\n688 - 1010110000\n689 - 1010110001\n690 - 1010110010\n691 - 1010110011\n692 - 1010110100\n693 - 1010110101\n694 - 1010110110\n695 - 1010110111\n696 - 1010111000\n697 - 1010111001\n698 - 1010111010\n699 - 1010111011\n700 - 1010111100\n701 - 1010111101\n702 - 1010111110\n703 - 1010111111\n704 - 1011000000\n705 - 1011000001\n706 - 1011000010\n707 - 1011000011\n708 - 1011000100\n709 - 1011000101\n710 - 1011000110\n711 - 1011000111\n712 - 1011001000\n713 - 1011001001\n714 - 1011001010\n715 - 1011001011\n716 - 1011001100\n717 - 1011001101\n718 - 1011001110\n719 - 1011001111\n720 - 1011010000\n721 - 1011010001\n722 - 1011010010\n723 - 1011010011\n724 - 1011010100\n725 - 1011010101\n726 - 1011010110\n727 - 1011010111\n728 - 1011011000\n729 - 1011011001\n730 - 1011011010\n731 - 1011011011\n732 - 1011011100\n733 - 1011011101\n734 - 1011011110\n735 - 1011011111\n736 - 1011100000\n737 - 1011100001\n738 - 1011100010\n739 - 1011100011\n740 - 1011100100\n741 - 1011100101\n742 - 1011100110\n743 - 1011100111\n744 - 1011101000\n745 - 1011101001\n746 - 1011101010\n747 - 1011101011\n748 - 1011101100\n749 - 1011101101\n750 - 1011101110\n751 - 1011101111\n752 - 1011110000\n753 - 1011110001\n754 - 1011110010\n755 - 1011110011\n756 - 1011110100\n757 - 1011110101\n758 - 1011110110\n759 - 1011110111\n760 - 1011111000\n761 - 1011111001\n762 - 1011111010\n763 - 1011111011\n764 - 1011111100\n765 - 1011111101\n766 - 1011111110\n767 - 1011111111\n768 - 1100000000\n769 - 1100000001\n770 - 1100000010\n771 - 1100000011\n772 - 1100000100\n773 - 1100000101\n774 - 1100000110\n775 - 1100000111\n776 - 1100001000\n777 - 1100001001\n778 - 1100001010\n779 - 1100001011\n780 - 1100001100\n781 - 1100001101\n782 - 1100001110\n783 - 1100001111\n784 - 1100010000\n785 - 1100010001\n786 - 1100010010\n787 - 1100010011\n788 - 1100010100\n789 - 1100010101\n790 - 1100010110\n791 - 1100010111\n792 - 1100011000\n793 - 1100011001\n794 - 1100011010\n795 - 1100011011\n796 - 1100011100\n797 - 1100011101\n798 - 1100011110\n799 - 1100011111\n800 - 1100100000\n801 - 1100100001\n802 - 1100100010\n803 - 1100100011\n804 - 1100100100\n805 - 1100100101\n806 - 1100100110\n807 - 1100100111\n808 - 1100101000\n809 - 1100101001\n810 - 1100101010\n811 - 1100101011\n812 - 1100101100\n813 - 1100101101\n814 - 1100101110\n815 - 1100101111\n816 - 1100110000\n817 - 1100110001\n818 - 1100110010\n819 - 1100110011\n820 - 1100110100\n821 - 1100110101\n822 - 1100110110\n823 - 1100110111\n824 - 1100111000\n825 - 1100111001\n826 - 1100111010\n827 - 1100111011\n828 - 1100111100\n829 - 1100111101\n830 - 1100111110\n831 - 1100111111\n832 - 1101000000\n833 - 1101000001\n834 - 1101000010\n835 - 1101000011\n836 - 1101000100\n837 - 1101000101\n838 - 1101000110\n839 - 1101000111\n840 - 1101001000\n841 - 1101001001\n842 - 1101001010\n843 - 1101001011\n844 - 1101001100\n845 - 1101001101\n846 - 1101001110\n847 - 1101001111\n848 - 1101010000\n849 - 1101010001\n850 - 1101010010\n851 - 1101010011\n852 - 1101010100\n853 - 1101010101\n854 - 1101010110\n855 - 1101010111\n856 - 1101011000\n857 - 1101011001\n858 - 1101011010\n859 - 1101011011\n860 - 1101011100\n861 - 1101011101\n862 - 1101011110\n863 - 1101011111\n864 - 1101100000\n865 - 1101100001\n866 - 1101100010\n867 - 1101100011\n868 - 1101100100\n869 - 1101100101\n870 - 1101100110\n871 - 1101100111\n872 - 1101101000\n873 - 1101101001\n874 - 1101101010\n875 - 1101101011\n876 - 1101101100\n877 - 1101101101\n878 - 1101101110\n879 - 1101101111\n880 - 1101110000\n881 - 1101110001\n882 - 1101110010\n883 - 1101110011\n884 - 1101110100\n885 - 1101110101\n886 - 1101110110\n887 - 1101110111\n888 - 1101111000\n889 - 1101111001\n890 - 1101111010\n891 - 1101111011\n892 - 1101111100\n893 - 1101111101\n894 - 1101111110\n895 - 1101111111\n896 - 1110000000\n897 - 1110000001\n898 - 1110000010\n899 - 1110000011\n900 - 1110000100\n901 - 1110000101\n902 - 1110000110\n903 - 1110000111\n904 - 1110001000\n905 - 1110001001\n906 - 1110001010\n907 - 1110001011\n908 - 1110001100\n909 - 1110001101\n910 - 1110001110\n911 - 1110001111\n912 - 1110010000\n913 - 1110010001\n914 - 1110010010\n915 - 1110010011\n916 - 1110010100\n917 - 1110010101\n918 - 1110010110\n919 - 1110010111\n920 - 1110011000\n921 - 1110011001\n922 - 1110011010\n923 - 1110011011\n924 - 1110011100\n925 - 1110011101\n926 - 1110011110\n927 - 1110011111\n928 - 1110100000\n929 - 1110100001\n930 - 1110100010\n931 - 1110100011\n932 - 1110100100\n933 - 1110100101\n934 - 1110100110\n935 - 1110100111\n936 - 1110101000\n937 - 1110101001\n938 - 1110101010\n939 - 1110101011\n940 - 1110101100\n941 - 1110101101\n942 - 1110101110\n943 - 1110101111\n944 - 1110110000\n945 - 1110110001\n946 - 1110110010\n947 - 1110110011\n948 - 1110110100\n949 - 1110110101\n950 - 1110110110\n951 - 1110110111\n952 - 1110111000\n953 - 1110111001\n954 - 1110111010\n955 - 1110111011\n956 - 1110111100\n957 - 1110111101\n958 - 1110111110\n959 - 1110111111\n960 - 1111000000\n961 - 1111000001\n962 - 1111000010\n963 - 1111000011\n964 - 1111000100\n965 - 1111000101\n966 - 1111000110\n967 - 1111000111\n968 - 1111001000\n969 - 1111001001\n970 - 1111001010\n971 - 1111001011\n972 - 1111001100\n973 - 1111001101\n974 - 1111001110\n975 - 1111001111\n976 - 1111010000\n977 - 1111010001\n978 - 1111010010\n979 - 1111010011\n980 - 1111010100\n981 - 1111010101\n982 - 1111010110\n983 - 1111010111\n984 - 1111011000\n985 - 1111011001\n986 - 1111011010\n987 - 1111011011\n988 - 1111011100\n989 - 1111011101\n990 - 1111011110\n991 - 1111011111\n992 - 1111100000\n993 - 1111100001\n994 - 1111100010\n995 - 1111100011\n996 - 1111100100\n997 - 1111100101\n998 - 1111100110\n999 - 1111100111\n
Output for hhvm-3.10.0

Process exited with code 153.