3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ function mySort($a,$b){ return $a-$b; } function test(){ $arr = array(1,2,3,4,5,6,7); usort($arr,array('Test','mySort')); } } $t = new Test(); $t->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9PB8Y
function name:  (null)
number of ops:  6
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Test:
Function mysort:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9PB8Y
function name:  mySort
number of ops:  5
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        SUB                                              ~2      !0, !1
          3      > RETURN                                                   ~2
    5     4*     > RETURN                                                   null

End of function mysort

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

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.5 ms | 1400 KiB | 15 Q