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; foreach($tmpas as $key => $value) { $tmpas[$key]['index'] = rand(); } print_r($activeSkillList); print_r($tmpas );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 25
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 25
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/VUN3U
function name:  (null)
number of ops:  33
compiled vars:  !0 = $activeSkillList, !1 = $tmp, !2 = $tmpas, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     '%3Cpre%3E'
    3     1        NEW                                              $5      'ArrayObject'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
    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%2FVUN3U%3A10%240'
   12    13        SEND_VAL_EX                                              ~11
         14        DO_FCALL                                      0          
   14    15        ASSIGN                                                   !1, !0
   16    16      > FE_RESET_R                                       $14     !2, ->25
         17    > > FE_FETCH_R                                       ~15     $14, !3, ->25
         18    >   ASSIGN                                                   !4, ~15
   17    19        INIT_FCALL                                               'rand'
         20        DO_ICALL                                         $19     
         21        FETCH_DIM_W                                      $17     !2, !4
         22        ASSIGN_DIM                                               $17, 'index'
         23        OP_DATA                                                  $19
   16    24      > JMP                                                      ->17
         25    >   FE_FREE                                                  $14
   19    26        INIT_FCALL                                               'print_r'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                                 
   20    29        INIT_FCALL                                               'print_r'
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FVUN3U%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VUN3U
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%2FVUN3U%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.08 ms | 1400 KiB | 19 Q