3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Task 1: Decode secret word * * $data variable (defined below) is an array of digits, that represents binary data. Every element of array * is a single-byte char code. * * The task is to decompress gzipped binary data, then to decode the result as base 64 encoded string and * to print to output the result string - this is a secret word. * */ $data = [120, 156, 11, 204, 13, 43, 142, 140, 240, 50, 76, 174, 116, 181, 5, 0, 27, 141, 4, 18]; function decode(&$val) { $val = chr($val); } array_walk($data, 'decode'); echo base64_decode(gzuncompress(implode($data)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l84dt
function name:  (null)
number of ops:  16
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, <array>
   20     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'decode'
          4        DO_ICALL                                                 
   22     5        INIT_FCALL                                               'base64_decode'
          6        INIT_FCALL                                               'gzuncompress'
          7        INIT_FCALL                                               'implode'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                         $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                         $5      
         14        ECHO                                                     $5
         15      > RETURN                                                   1

Function decode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l84dt
function name:  decode
number of ops:  6
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        INIT_FCALL                                               'chr'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
   19     5      > RETURN                                                   null

End of function decode

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.08 ms | 1395 KiB | 23 Q