3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( 10 => array('id' => 'dix', 'aa' => '1010'), 100 => array('id' => 'cent', 'aa' => '100100'), 2 => array('id' => 'deux', 'aa' => '22'), 7 => array('id' => 'sept', 'aa' => '77')); // id sorting function so ($a, $b) { return (strcmp ($a['id'],$b['id'])); } for($i=0; $i<1000; $i++){ echo uasort($arr, 'so'); } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
Branch analysis from position: 3
filename:       /in/qRknc
function name:  (null)
number of ops:  12
compiled vars:  !0 = $arr, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->9
   10     3    >   INIT_FCALL                                               'uasort'
          4        SEND_REF                                                 !0
          5        SEND_VAL                                                 'so'
          6        DO_ICALL                                         $4      
          7        ECHO                                                     $4
    9     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 1000
         10      > JMPNZ                                                    ~6, ->3
   13    11    > > RETURN                                                   1

Function so:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qRknc
function name:  so
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        INIT_FCALL                                               'strcmp'
          3        FETCH_DIM_R                                      ~2      !0, 'id'
          4        SEND_VAL                                                 ~2
          5        FETCH_DIM_R                                      ~3      !1, 'id'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8      > RETURN                                                   $4
          9*     > RETURN                                                   null

End of function so

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.73 ms | 1387 KiB | 17 Q