3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public static $data = array(); public function __set($name, $value) { self::$data[$name] = $value; } public function __get($name) { return self::$data[$name]; } public static function set() { self::$var = 'hello'; echo self::$var; } } test::set();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bAX0C
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_STATIC_METHOD_CALL                                  'test', 'set'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class test:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bAX0C
function name:  __set
number of ops:  6
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        FETCH_STATIC_PROP_W          global              $2      'data'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
    9     5      > RETURN                                                   null

End of function __set

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bAX0C
function name:  __get
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        FETCH_STATIC_PROP_R          unknown             ~1      'data'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
   13     4*     > RETURN                                                   null

End of function __get

Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bAX0C
function name:  set
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN_STATIC_PROP                                       'var'
          1        OP_DATA                                                  'hello'
   17     2        FETCH_STATIC_PROP_R          unknown             ~1      'var'
          3        ECHO                                                     ~1
   18     4      > RETURN                                                   null

End of function set

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.4 ms | 1395 KiB | 13 Q