3v4l.org

run code in 300+ PHP versions simultaneously
<?php $names = array('Alpha', 'bravo', 'Charly', 'delta', 'Echo'); $sorts = array( 'regular' => SORT_REGULAR, 'numeric' => SORT_NUMERIC, 'string' => SORT_STRING, 'natural' => SORT_NATURAL, 'case' => SORT_FLAG_CASE, ); print_r($names); foreach ($sorts as $name => $flag) { sort($names, $flag); echo $name ."\r\n"; print_r($names); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 18
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/ueAdb
function name:  (null)
number of ops:  20
compiled vars:  !0 = $names, !1 = $sorts, !2 = $flag, !3 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
   13     2        INIT_FCALL                                               'print_r'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   15     5      > FE_RESET_R                                       $7      !1, ->18
          6    > > FE_FETCH_R                                       ~8      $7, !2, ->18
          7    >   ASSIGN                                                   !3, ~8
   16     8        INIT_FCALL                                               'sort'
          9        SEND_REF                                                 !0
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
   17    12        CONCAT                                           ~11     !3, '%0D%0A'
         13        ECHO                                                     ~11
   18    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
   15    17      > JMP                                                      ->6
         18    >   FE_FREE                                                  $7
   19    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.32 ms | 1395 KiB | 17 Q