3v4l.org

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

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

End of function cmp

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.68 ms | 1395 KiB | 19 Q