3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = range(1,25); $b = array('21'=>'test'); $t = array_map('associate', $a); function associate($a) { $r = (isset($b[$av]))?$b[$a]:null; } print_r($t);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B6V8B
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $b, !2 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 25
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    4     5        ASSIGN                                                   !1, <array>
    6     6        INIT_FCALL                                               'array_map'
          7        SEND_VAL                                                 'associate'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
   13    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function associate:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B6V8B
function name:  associate
number of ops:  9
compiled vars:  !0 = $a, !1 = $r, !2 = $b, !3 = $av
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        ISSET_ISEMPTY_DIM_OBJ                         0          !2, !3
          2      > JMPZ                                                     ~4, ->6
          3    >   FETCH_DIM_R                                      ~5      !2, !0
          4        QM_ASSIGN                                        ~6      ~5
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~6      null
          7    >   ASSIGN                                                   !1, ~6
   10     8      > RETURN                                                   null

End of function associate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.17 ms | 1395 KiB | 19 Q