3v4l.org

run code in 300+ PHP versions simultaneously
<?php $daftar_penumpang =["sandhika",null,"carl","keith"]; array_walk($daftar_penumpang, function($v, $k, $prefix) use (&$daftar_penumpang) { if ($v == null) { $daftar_penumpang[$k] = $prefix; } }, 'test'); print_r($daftar_penumpang);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vVnSq
function name:  (null)
number of ops:  12
compiled vars:  !0 = $daftar_penumpang
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          4        BIND_LEXICAL                                             ~2, !0
    9     5        SEND_VAL                                                 ~2
          6        SEND_VAL                                                 'test'
    5     7        DO_ICALL                                                 
   11     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/vVnSq
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $v, !1 = $k, !2 = $prefix, !3 = $daftar_penumpang
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        BIND_STATIC                                              !3
    6     4        IS_EQUAL                                                 !0, null
          5      > JMPZ                                                     ~4, ->8
    7     6    >   ASSIGN_DIM                                               !3, !1
          7        OP_DATA                                                  !2
    9     8    > > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.35 ms | 1011 KiB | 15 Q