3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected static $myVar = 'something'; public function method($val) { if (isset(self::$val)) { print self::$val; } else { print 'lololol'; } } } $a = new A(); $a->method('myVar');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/634Y5
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'method'
          4        SEND_VAL_EX                                              'myVar'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class A:
Function method:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/634Y5
function name:  method
number of ops:  8
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ISSET_ISEMPTY_STATIC_PROP                                'val'
          2      > JMPZ                                                     ~1, ->6
    7     3    >   FETCH_STATIC_PROP_R          unknown             ~2      'val'
          4        ECHO                                                     ~2
          5      > JMP                                                      ->7
    9     6    >   ECHO                                                     'lololol'
   11     7    > > RETURN                                                   null

End of function method

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.22 ms | 1393 KiB | 13 Q