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 strlen(base64_encode(gzcompress(json_encode($val))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Branch analysis from position: 3
filename:       /in/Ipiu8
function name:  (null)
number of ops:  35
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                                                      ->7
    4     3    >   FETCH_CONSTANT                                   ~5      'mt_rand'
          4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  ~5
    3     6        PRE_INC                                                  !1
          7    >   IS_SMALLER                                               !1, 30
          8      > JMPNZ                                                    ~7, ->3
    7     9    >   INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $8      
         12        STRLEN                                           ~9      $8
         13        ECHO                                                     ~9
         14        ECHO                                                     '%0A'
    8    15        INIT_FCALL                                               'gzcompress'
         16        INIT_FCALL                                               'json_encode'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $10     
         19        SEND_VAR                                                 $10
         20        DO_ICALL                                         $11     
         21        STRLEN                                           ~12     $11
         22        ECHO                                                     ~12
    9    23        INIT_FCALL                                               'base64_encode'
         24        INIT_FCALL                                               'gzcompress'
         25        INIT_FCALL                                               'json_encode'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $13     
         28        SEND_VAR                                                 $13
         29        DO_ICALL                                         $14     
         30        SEND_VAR                                                 $14
         31        DO_ICALL                                         $15     
         32        STRLEN                                           ~16     $15
         33        ECHO                                                     ~16
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.07 ms | 1396 KiB | 19 Q