3v4l.org

run code in 300+ PHP versions simultaneously
<?php $available_templates = [ '' => 'Placeholder', 404 => '404', 'single' => 'Single Post', ]; $merge = array_merge( [ '' => 'Default template', ], $available_templates ); $replace = array_replace( $available_templates, [ '' => 'Default template', ] ); var_dump( $merge ); var_dump( $replace );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tlft6
function name:  (null)
number of ops:  18
compiled vars:  !0 = $available_templates, !1 = $merge, !2 = $replace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'array_merge'
   10     2        SEND_VAL                                                 <array>
   11     3        SEND_VAR                                                 !0
    9     4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   13     6        INIT_FCALL                                               'array_replace'
          7        SEND_VAR                                                 !0
   14     8        SEND_VAL                                                 <array>
   13     9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
   17    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   18    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
244.53 ms | 954 KiB | 16 Q