3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.13 ms | 998 KiB | 15 Q