3v4l.org

run code in 300+ PHP versions simultaneously
<?php function acasesort($a, $b) { return strcasecmp($a, $b); } class A { function B() { $tags = array('Test', 'tests', 'tes', 'abc'); usort($tags, "acasesort"); var_dump($tags); } } (new A)->B();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OoMtj
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $0      'A'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'B'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

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

End of function acasesort

Class A:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OoMtj
function name:  B
number of ops:  9
compiled vars:  !0 = $tags
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'acasesort'
          4        DO_ICALL                                                 
   11     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   12     8      > RETURN                                                   null

End of function b

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.42 ms | 1395 KiB | 19 Q