3v4l.org

run code in 300+ PHP versions simultaneously
<?php defined('SORT_FLAG_CASE') or define('SORT_FLAG_CASE', false); echo 'SORT_FLAG_CASE : '.SORT_FLAG_CASE."\n"; $arr = array('foo' => 2,'Bar' => 1, 'bar' => 3, 'a' => 0); if(SORT_FLAG_CASE) ksort($arr, SORT_STRING|SORT_FLAG_CASE); else{ $arr=natcasesort($arr); } var_dump($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3igQS
function name:  (null)
number of ops:  16
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'SORT_FLAG_CASE+%3A+8%0A'
    4     1        ASSIGN                                                   !0, <array>
    5     2      > JMPZ                                                     8, ->8
    6     3    >   INIT_FCALL                                               'ksort'
          4        SEND_REF                                                 !0
          5        SEND_VAL                                                 10
          6        DO_ICALL                                                 
          7      > JMP                                                      ->12
    8     8    >   INIT_FCALL                                               'natcasesort'
          9        SEND_REF                                                 !0
         10        DO_ICALL                                         $3      
         11        ASSIGN                                                   !0, $3
   10    12    >   INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154 ms | 1394 KiB | 19 Q