3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hex = '0050'; echo base_convert($hex, 16, 2) . "\n"; $bin = sprintf("%016b", hexdec($hex)); echo implode(' ', str_split($bin, 4)) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NRoFS
function name:  (null)
number of ops:  27
compiled vars:  !0 = $hex, !1 = $bin
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '0050'
    3     1        INIT_FCALL                                               'base_convert'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 16
          4        SEND_VAL                                                 2
          5        DO_ICALL                                         $3      
          6        CONCAT                                           ~4      $3, '%0A'
          7        ECHO                                                     ~4
    4     8        INIT_FCALL                                               'sprintf'
          9        SEND_VAL                                                 '%25016b'
         10        INIT_FCALL                                               'hexdec'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !1, $6
    5    16        INIT_FCALL                                               'implode'
         17        SEND_VAL                                                 '+'
         18        INIT_FCALL                                               'str_split'
         19        SEND_VAR                                                 !1
         20        SEND_VAL                                                 4
         21        DO_ICALL                                         $8      
         22        SEND_VAR                                                 $8
         23        DO_ICALL                                         $9      
         24        CONCAT                                           ~10     $9, '%0A'
         25        ECHO                                                     ~10
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.63 ms | 1009 KiB | 18 Q