3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmp = (object)array("type" => false, "value1" => ""); $array = array(); array_push($array, $tmp); echo json_encode($array); array_unshift($array, $tmp); echo json_encode($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dEhGl
function name:  (null)
number of ops:  20
compiled vars:  !0 = $tmp, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   CAST                                          8  ~2      <array>
          1        ASSIGN                                                   !0, ~2
    3     2        ASSIGN                                                   !1, <array>
    4     3        INIT_FCALL                                               'array_push'
          4        SEND_REF                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    5     7        INIT_FCALL                                               'json_encode'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10        ECHO                                                     $6
    6    11        INIT_FCALL                                               'array_unshift'
         12        SEND_REF                                                 !1
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
    7    15        INIT_FCALL                                               'json_encode'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $8      
         18        ECHO                                                     $8
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.08 ms | 1394 KiB | 19 Q