3v4l.org

run code in 300+ PHP versions simultaneously
<?php $folders = array( array('name' => 'aabc'), array('name' => 'aacc'), array('name' => 'gargoyle'), array('name' => 'abcd') ); usort($folders, function ($a, $b) { return strnatcmp($a['name'], $b['name']); }); foreach($folders as $folder) { echo $folder['name'], PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/gc2qg
function name:  (null)
number of ops:  14
compiled vars:  !0 = $folders, !1 = $folder
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fgc2qg%3A10%240'
   12     4        SEND_VAL                                                 ~3
          5        DO_ICALL                                                 
   14     6      > FE_RESET_R                                       $5      !0, ->12
          7    > > FE_FETCH_R                                               $5, !1, ->12
   15     8    >   FETCH_DIM_R                                      ~6      !1, 'name'
          9        ECHO                                                     ~6
         10        ECHO                                                     '%0A'
   14    11      > JMP                                                      ->7
         12    >   FE_FREE                                                  $5
   16    13      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.86 ms | 1401 KiB | 17 Q