3v4l.org

run code in 500+ PHP versions simultaneously
<?php class C { static function s(&$x) { $x = 2; } } $v = "C::s"; $x = 1; call_user_func($v, $x); echo $x;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PbM0Z
function name:  (null)
number of ops:  7
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                                    1          'call_user_func', !0
          3        SEND_USER                                                    !1
          4        DO_FCALL                                          0          
    8     5        ECHO                                                         !1
    9     6      > RETURN                                                       1

Class C:
Function s:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PbM0Z
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.5.0


preferences:
134.5 ms | 3359 KiB | 13 Q