3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*class A { static $a=7; var $b=9; }*/ A::__set_state(array( 'b' => 9, )); function f($obj) { var_export($obj); echo $obj::$a; } $a; f(new A);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6RnMT
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_STATIC_METHOD_CALL                                  'A', '__set_state'
   10     1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
   22     3        INIT_FCALL                                               'f'
          4        NEW                                              $2      'A'
          5        DO_FCALL                                      0          
          6        SEND_VAR                                                 $2
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6RnMT
function name:  f
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   16     1        INIT_FCALL                                               'var_export'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   17     4        FETCH_CLASS                                   0  $2      !0
          5        FETCH_STATIC_PROP_R          global lock         ~3      'a'
          6        ECHO                                                     ~3
   18     7      > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.14 ms | 1397 KiB | 16 Q