3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = ["a","b","c"]; var_dump(json_encode($arr1)); $arr2 = [1=>"A", 3=>"b", 4=>"c"]; var_dump(json_encode($arr2)); $arr3 = [1=>"A", 14=>"b", 10=>"c"]; var_dump(json_encode($arr2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jjYVL
function name:  (null)
number of ops:  22
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $arr3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'json_encode'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_ICALL                                                 
    7     7        ASSIGN                                                   !1, <array>
    9     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                                 
   11    14        ASSIGN                                                   !2, <array>
   13    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'json_encode'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $10     
         19        SEND_VAR                                                 $10
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.83 ms | 1395 KiB | 17 Q