3v4l.org

run code in 300+ PHP versions simultaneously
<?php $first = ['Catalog No.: ', 'H-B No. ']; $second = [['GG', 692],['VV', 693]]; var_export( array_map( fn($row) => substr_replace($row, $first, 0, 0), $second ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SpSbM
function name:  (null)
number of ops:  12
compiled vars:  !0 = $first, !1 = $second
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'var_export'
    7     3        INIT_FCALL                                               'array_map'
    8     4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          5        BIND_LEXICAL                                             ~4, !0
          6        SEND_VAL                                                 ~4
    9     7        SEND_VAR                                                 !1
    7     8        DO_ICALL                                         $5      
    9     9        SEND_VAR                                                 $5
    6    10        DO_ICALL                                                 
   11    11      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SpSbM
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $row, !1 = $first
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'substr_replace'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 0
          7        DO_ICALL                                         $2      
          8      > RETURN                                                   $2
          9*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.75 ms | 1012 KiB | 16 Q