3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = [str_repeat(mt_rand(), 30)]; 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 = 62) Position 1 = -2
filename:       /in/cmJ30
function name:  (null)
number of ops:  34
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'str_repeat'
          1        INIT_FCALL                                               'mt_rand'
          2        DO_ICALL                                         $1      
          3        SEND_VAR                                                 $1
          4        SEND_VAL                                                 30
          5        DO_ICALL                                         $2      
          6        INIT_ARRAY                                       ~3      $2
          7        ASSIGN                                                   !0, ~3
    4     8        INIT_FCALL                                               'json_encode'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $5      
         11        STRLEN                                           ~6      $5
         12        ECHO                                                     ~6
         13        ECHO                                                     '%0A'
    5    14        INIT_FCALL                                               'gzcompress'
         15        INIT_FCALL                                               'json_encode'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                         $8      
         20        STRLEN                                           ~9      $8
         21        ECHO                                                     ~9
    6    22        INIT_FCALL                                               'base64_encode'
         23        INIT_FCALL                                               'gzcompress'
         24        INIT_FCALL                                               'json_encode'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $10     
         27        SEND_VAR                                                 $10
         28        DO_ICALL                                         $11     
         29        SEND_VAR                                                 $11
         30        DO_ICALL                                         $12     
         31        STRLEN                                           ~13     $12
         32        ECHO                                                     ~13
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.12 ms | 1396 KiB | 23 Q