3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump('list'); $a = ['foo']; var_dump(json_encode($a)); unset($a[0]); var_dump(json_encode($a)); var_dump('dict'); $a = ['bar' => 'foo']; var_dump(json_encode($a)); unset($a['bar']); var_dump(json_encode($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/42qO0
function name:  (null)
number of ops:  35
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'list'
          2        DO_ICALL                                                 
    4     3        ASSIGN                                                   !0, <array>
    5     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'json_encode'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
    6    10        UNSET_DIM                                                !0, 0
    7    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'json_encode'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15        SEND_VAR                                                 $5
         16        DO_ICALL                                                 
    9    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAL                                                 'dict'
         19        DO_ICALL                                                 
   10    20        ASSIGN                                                   !0, <array>
   11    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'json_encode'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $9      
         25        SEND_VAR                                                 $9
         26        DO_ICALL                                                 
   12    27        UNSET_DIM                                                !0, 'bar'
   13    28        INIT_FCALL                                               'var_dump'
         29        INIT_FCALL                                               'json_encode'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                         $11     
         32        SEND_VAR                                                 $11
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.86 ms | 1012 KiB | 15 Q