3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(base64_encode(pack('C8', 32767))); /* function pack_encode($val) { $b64 = base64_encode(pack($format, $val)); return str_replace(array('/', '='), array('_', ''), $b64); // "/" json-encodes poorly and "=" is padding } function pack_decode($bin) { $b64 = str_replace('_', '/', $bin); // un-padded $data = unpack('C'.(length($bin)/2), base64_decode($b64, false)); $val = 0; foreach ($data as $v) { $val = ($val<<$width) | $v; } return $val; } $max = 32767; $n = 20; $step = intval($max/$n); for ($i=0; $i<=$n; $i++) { $val = $i*$step; $enc = pack_encode($val); $dec = pack_decode($val); echo "$enc $dec $val\n"; } */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ogLru
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'base64_encode'
          2        INIT_FCALL                                               'pack'
          3        SEND_VAL                                                 'C8'
          4        SEND_VAL                                                 32767
          5        DO_ICALL                                         $0      
          6        SEND_VAR                                                 $0
          7        DO_ICALL                                         $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                                 
   30    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.72 ms | 1394 KiB | 19 Q