3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { static function s(&$x) { $x = 2; } } $v = "C::s"; $x = 1; call_user_func_array($v, array(&$x)); echo $x;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eYFoc
function name:  (null)
number of ops:  9
compiled vars:  !0 = $v, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'C%3A%3As'
    6     1        ASSIGN                                                   !1, 1
    7     2        INIT_USER_CALL                                0          'call_user_func_array', !0
          3        INIT_ARRAY                                       ~4      !1
          4        SEND_ARRAY                                               ~4
          5        CHECK_UNDEF_ARGS                                         
          6        DO_FCALL                                      1          
    8     7        ECHO                                                     !1
    9     8      > RETURN                                                   1

Class C:
Function s:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eYFoc
function name:  s
number of ops:  3
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        ASSIGN                                                   !0, 2
          2      > RETURN                                                   null

End of function s

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.6 ms | 1447 KiB | 13 Q