3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static $var; public static function doStuff() { var_dump($this->var); } public static function setVar($s) { self::$var = $s; } } A::setVar('hello'); A::doStuff();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dag9I
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'setVar'
          1        SEND_VAL                                                 'hello'
          2        DO_FCALL                                      0          
   15     3        INIT_STATIC_METHOD_CALL                                  'A', 'doStuff'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class A:
Function dostuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dag9I
function name:  doStuff
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       $0      
          2        FETCH_OBJ_R                                      ~1      $0, 'var'
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    7     5      > RETURN                                                   null

End of function dostuff

Function setvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dag9I
function name:  setVar
number of ops:  4
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        ASSIGN_STATIC_PROP                                       'var'
          2        OP_DATA                                                  !0
   10     3      > RETURN                                                   null

End of function setvar

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.86 ms | 1395 KiB | 15 Q