3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cmp($b, $c){ global $a; var_dump($a); $a->exchangeArray(array()); } $a = new ArrayObject(); $a[1] = 1; $a[2] = 2; $a[3] = 3; $a->uasort('cmp');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RtLnW
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'ArrayObject'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   10     3        ASSIGN_DIM                                               !0, 1
          4        OP_DATA                                                  1
   11     5        ASSIGN_DIM                                               !0, 2
          6        OP_DATA                                                  2
   12     7        ASSIGN_DIM                                               !0, 3
          8        OP_DATA                                                  3
   14     9        INIT_METHOD_CALL                                         !0, 'uasort'
         10        SEND_VAL_EX                                              'cmp'
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

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

End of function cmp

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.65 ms | 1395 KiB | 15 Q