3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = array(); $myArray[]['username'] = 'cpranot'; $myArray[]['username'] = 'lcruz'; $myArray[]['username'] = 'adlee'; usort($myArray, function($a, $b) { return strnatcmp($a["username"], $b["username"]); }); var_dump($myArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QOvqe
function name:  (null)
number of ops:  19
compiled vars:  !0 = $myArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        FETCH_DIM_W                                      $2      !0
          2        ASSIGN_DIM                                               $2, 'username'
          3        OP_DATA                                                  'cpranot'
    4     4        FETCH_DIM_W                                      $4      !0
          5        ASSIGN_DIM                                               $4, 'username'
          6        OP_DATA                                                  'lcruz'
    5     7        FETCH_DIM_W                                      $6      !0
          8        ASSIGN_DIM                                               $6, 'username'
          9        OP_DATA                                                  'adlee'
    7    10        INIT_FCALL                                               'usort'
         11        SEND_REF                                                 !0
         12        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FQOvqe%3A7%240'
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                                 
    9    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FQOvqe%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.11 ms | 1396 KiB | 19 Q