3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function B() { $tags = array('Test', 'tests', 'tes', 'abc'); usort($tags, array($this, 'C')); var_dump($tags); } function C($a, $b) { return strcasecmp($a, $b); } } (new A)->B();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PC7P0
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

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

End of function b

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

End of function c

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.32 ms | 1396 KiB | 19 Q