3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.65 ms | 1398 KiB | 19 Q