3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array( 1 => array( "first_name" => "Sahil", "last_name" => "Kamble", "role_id" => 4, "department_name" => "Creative" ), 2 => array( "first_name" => "Tanaji", "last_name" => "Manohare", "role_id" => 4, "department_name" => "Creative" ), "self" => array( "first_name" => "Sonali", "last_name" => "Banerji", "role_id" => 3, "department_name" => "Creative" ), 0 => array( "first_name" => "Laveena", "last_name" => "Sengar", "role_id" => 4, "department_name" => "Creative" ) ); uksort($array1, function ($ka, $kb) { if (is_int($ka)) { if (!is_int($kb)) { return 1; } return $ka - $kb; } else { if (!is_int($kb)) { return strcmp($ka, $kb); } return -1; } }); print_r($array1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gh85M
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   30     1        INIT_FCALL                                               'uksort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   43     4        SEND_VAL                                                 ~2
   30     5        DO_ICALL                                                 
   45     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gh85M
function name:  {closure}
number of ops:  21
compiled vars:  !0 = $ka, !1 = $kb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   31     2        TYPE_CHECK                                   16          !0
          3      > JMPZ                                                     ~2, ->11
   32     4    >   TYPE_CHECK                                   16  ~3      !1
          5        BOOL_NOT                                         ~4      ~3
          6      > JMPZ                                                     ~4, ->8
   33     7    > > RETURN                                                   1
   35     8    >   SUB                                              ~5      !0, !1
          9      > RETURN                                                   ~5
   31    10*       JMP                                                      ->20
   38    11    >   TYPE_CHECK                                   16  ~6      !1
         12        BOOL_NOT                                         ~7      ~6
         13      > JMPZ                                                     ~7, ->19
   39    14    >   INIT_FCALL                                               'strcmp'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $8      
         18      > RETURN                                                   $8
   41    19    > > RETURN                                                   -1
   43    20*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.1 ms | 1001 KiB | 16 Q