3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); class a { function static($n, $v = null) { if(!isset($$n)) { eval("static $n;"); } if(!is_null($v)) { $$n = $v; } else return $$n; } var $a = 4; function b() { echo $this->a; } } a::$a = 5; a::b();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YJX4j
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
   25     3        ASSIGN_STATIC_PROP                                       'a', 'a'
          4        OP_DATA                                                  5
   26     5        INIT_STATIC_METHOD_CALL                                  'a', 'b'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class a:
Function static:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/YJX4j
function name:  static
number of ops:  18
compiled vars:  !0 = $n, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
    9     2        ISSET_ISEMPTY_VAR                             4  ~2      !0
          3        BOOL_NOT                                         ~3      ~2
          4      > JMPZ                                                     ~3, ->9
   11     5    >   ROPE_INIT                                     3  ~5      'static+'
          6        ROPE_ADD                                      1  ~5      ~5, !0
          7        ROPE_END                                      2  ~4      ~5, '%3B'
          8        INCLUDE_OR_EVAL                                          ~4, EVAL
   13     9    >   TYPE_CHECK                                    2  ~8      !1
         10        BOOL_NOT                                         ~9      ~8
         11      > JMPZ                                                     ~9, ->15
   15    12    >   FETCH_W                      local               $10     !0
         13        ASSIGN                                                   $10, !1
         14      > JMP                                                      ->17
   17    15    >   FETCH_R                      local               ~12     !0
         16      > RETURN                                                   ~12
   18    17    > > RETURN                                                   null

End of function static

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YJX4j
function name:  b
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        ECHO                                                     ~0
   22     2      > RETURN                                                   null

End of function b

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
196.68 ms | 1396 KiB | 15 Q