3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = []; for($i=0; $i<30;$i++) { $val[] = mt_rand(); } echo strlen(json_encode($val)); echo "\n"; echo strlen(gzcompress(json_encode($val))); echo "\n"; echo strlen(base64_encode(gzcompress(json_encode($val))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
Branch analysis from position: 3
filename:       /in/ZPOSN
function name:  (null)
number of ops:  37
compiled vars:  !0 = $val, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->8
    4     3    >   INIT_FCALL                                               'mt_rand'
          4        DO_ICALL                                         $5      
          5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  $5
    3     7        PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 30
          9      > JMPNZ                                                    ~7, ->3
    7    10    >   INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $8      
         13        STRLEN                                           ~9      $8
         14        ECHO                                                     ~9
         15        ECHO                                                     '%0A'
    8    16        INIT_FCALL                                               'gzcompress'
         17        INIT_FCALL                                               'json_encode'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $10     
         20        SEND_VAR                                                 $10
         21        DO_ICALL                                         $11     
         22        STRLEN                                           ~12     $11
         23        ECHO                                                     ~12
         24        ECHO                                                     '%0A'
    9    25        INIT_FCALL                                               'base64_encode'
         26        INIT_FCALL                                               'gzcompress'
         27        INIT_FCALL                                               'json_encode'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $13     
         30        SEND_VAR                                                 $13
         31        DO_ICALL                                         $14     
         32        SEND_VAR                                                 $14
         33        DO_ICALL                                         $15     
         34        STRLEN                                           ~16     $15
         35        ECHO                                                     ~16
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.66 ms | 1396 KiB | 21 Q