3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ private static $logferr; public function foo(){ self::$logferr = 'msgfunc'; echo self::{self::$logferr}([1,3]); } private static function msgfunc($arg){ print_r($arg); } } $obj = new A(); $obj->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CYURS
function name:  (null)
number of ops:  6
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'foo'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class A:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CYURS
function name:  foo
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN_STATIC_PROP                                       'logferr'
          1        OP_DATA                                                  'msgfunc'
    9     2        FETCH_STATIC_PROP_R          unknown             ~1      'logferr'
          3        INIT_STATIC_METHOD_CALL                                  ~1
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0  $2      
          6        ECHO                                                     $2
   10     7      > RETURN                                                   null

End of function foo

Function msgfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CYURS
function name:  msgfunc
number of ops:  5
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   14     4      > RETURN                                                   null

End of function msgfunc

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.39 ms | 1395 KiB | 15 Q