3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=array("abc","Abc","def"); function cmp($a,$b){return strcmp(strtolower($a),strtolower($b));} usort($a,"cmp"); print_r($a); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/22pdY
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'cmp'
          4        DO_ICALL                                                 
    5     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    6     8      > RETURN                                                   1

Function cmp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/22pdY
function name:  cmp
number of ops:  14
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        INIT_FCALL                                               'strcmp'
          3        INIT_FCALL                                               'strtolower'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        INIT_FCALL                                               'strtolower'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                         $4      
         12      > RETURN                                                   $4
         13*     > RETURN                                                   null

End of function cmp

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.63 ms | 1395 KiB | 21 Q