3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = [str_repeat(mt_rand(), 30)]; echo strlen(json_encode($val)); echo strlen(gzcompress(json_encode($val)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r6DPV
function name:  (null)
number of ops:  22
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
    5    13        INIT_FCALL                                               'gzcompress'
         14        INIT_FCALL                                               'json_encode'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                         $8      
         19        STRLEN                                           ~9      $8
         20        ECHO                                                     ~9
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.87 ms | 1395 KiB | 21 Q