3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = $arr2 = array("12", "10", "2", "1"); echo "Standard string comparison\n"; usort($arr1, "strcmp"); print_r($arr1); echo "\nNatural order string comparison\n"; usort($arr2, "strnatcmp"); print_r($arr2); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pvbCC
function name:  (null)
number of ops:  19
compiled vars:  !0 = $arr1, !1 = $arr2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                           ~2      !1, <array>
          1        ASSIGN                                                   !0, ~2
    7     2        ECHO                                                     'Standard+string+comparison%0A'
    9     3        INIT_FCALL                                               'usort'
          4        SEND_REF                                                 !0
          5        SEND_VAL                                                 'strcmp'
          6        DO_ICALL                                                 
   10     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   12    10        ECHO                                                     '%0ANatural+order+string+comparison%0A'
   14    11        INIT_FCALL                                               'usort'
         12        SEND_REF                                                 !1
         13        SEND_VAL                                                 'strnatcmp'
         14        DO_ICALL                                                 
   15    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   17    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.97 ms | 1394 KiB | 17 Q