3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "<pre>"; $activeSkillList = new ArrayObject(); $activeSkillList['U1_1021002'] = array('refCardId'=> 'U1_1021002'); $activeSkillList['U3_1052005'] = array('refCardId'=> 'U3_1052005'); print_r($activeSkillList); $activeSkillList->uasort(function($skill1, $skill2) { return strcmp($skill1['refCardId'],$skill2['refCardId']); }); $tmp = $activeSkillList->getArrayCopy(); print_r($tmp); foreach($tmp as $key => $value) { $tmp[$key]['1111'] = 44; } print_r($tmp);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 28
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/YkFVd
function name:  (null)
number of ops:  33
compiled vars:  !0 = $activeSkillList, !1 = $tmp, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     '%3Cpre%3E'
    3     1        NEW                                              $4      'ArrayObject'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    5     4        ASSIGN_DIM                                               !0, 'U1_1021002'
          5        OP_DATA                                                  <array>
    6     6        ASSIGN_DIM                                               !0, 'U3_1052005'
          7        OP_DATA                                                  <array>
    8     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
   10    11        INIT_METHOD_CALL                                         !0, 'uasort'
         12        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FYkFVd%3A10%240'
   12    13        SEND_VAL_EX                                              ~10
         14        DO_FCALL                                      0          
   14    15        INIT_METHOD_CALL                                         !0, 'getArrayCopy'
         16        DO_FCALL                                      0  $12     
         17        ASSIGN                                                   !1, $12
   15    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
   16    21      > FE_RESET_R                                       $15     !1, ->28
         22    > > FE_FETCH_R                                       ~16     $15, !2, ->28
         23    >   ASSIGN                                                   !3, ~16
   17    24        FETCH_DIM_W                                      $18     !1, !3
         25        ASSIGN_DIM                                               $18, 1111
         26        OP_DATA                                                  44
   16    27      > JMP                                                      ->22
         28    >   FE_FREE                                                  $15
   18    29        INIT_FCALL                                               'print_r'
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FYkFVd%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YkFVd
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $skill1, !1 = $skill2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        INIT_FCALL                                               'strcmp'
          3        FETCH_DIM_R                                      ~2      !0, 'refCardId'
          4        SEND_VAL                                                 ~2
          5        FETCH_DIM_R                                      ~3      !1, 'refCardId'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8      > RETURN                                                   $4
   12     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FYkFVd%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.55 ms | 1400 KiB | 17 Q