3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.21 ms | 3308 KiB | 15 Q