3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array ( 'nurse' => array ( 'skill' => ' gfgfgfdNurse Practitioner', ), 'Nurse Practitioner' => array ( 'skill' => ' gfgfgfdNurse Practitioner', ), ); $c = []; array_walk($a, function(&$v, $k){ $v['new'] = &$v['skill']; unset($v['skill']); }); echo '<pre>'; print_r($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vf36W
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        ASSIGN                                                   !1, <array>
   14     2        INIT_FCALL                                               'array_walk'
          3        SEND_REF                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
   17     5        SEND_VAL                                                 ~4
   14     6        DO_ICALL                                                 
   18     7        ECHO                                                     '%3Cpre%3E'
   19     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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vf36W
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        FETCH_DIM_W                                      $3      !0, 'skill'
          3        MAKE_REF                                         $4      $3
          4        FETCH_DIM_W                                      $2      !0, 'new'
          5        ASSIGN_REF                                               $2, $4
   16     6        UNSET_DIM                                                !0, 'skill'
   17     7      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.62 ms | 1000 KiB | 15 Q