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]; $string = ''; foreach ($data as $char) { $string .= chr($char); } echo base64_decode(gzuncompress($string));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/nHrBQ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $data, !1 = $string, !2 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, ''
   17     2      > FE_RESET_R                                       $5      !0, ->9
          3    > > FE_FETCH_R                                               $5, !2, ->9
   18     4    >   INIT_FCALL                                               'chr'
          5        SEND_VAR                                                 !2
          6        DO_ICALL                                         $6      
          7        ASSIGN_OP                                     8          !1, $6
   17     8      > JMP                                                      ->3
          9    >   FE_FREE                                                  $5
   21    10        INIT_FCALL                                               'base64_decode'
         11        INIT_FCALL                                               'gzuncompress'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                         $9      
         16        ECHO                                                     $9
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.65 ms | 1395 KiB | 19 Q