3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('1' => 'one', '2' => 'two', '3' => 'three'); $arrayobject = new ArrayObject($array); //var_dump($arrayobject); $json = json_encode($arrayobject); echo $json;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Jg7u0
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array, !1 = $arrayobject, !2 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    6     1        NEW                                              $4      'ArrayObject'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
    8     5        INIT_FCALL                                               'json_encode'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !2, $7
    9     9        ECHO                                                     !2
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.52 ms | 1398 KiB | 15 Q