3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar = true; public static function bar() { return isset($this->bar) ? 'x' : 'y'; } } var_dump(Foo::bar()); var_dump((new Foo)->bar());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ip7ZY
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'Foo', 'bar'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
   14     5        INIT_FCALL                                               'var_dump'
          6        NEW                                              $2      'Foo'
          7        DO_FCALL                                      0          
          8        INIT_METHOD_CALL                                         $2, 'bar'
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ip7ZY
function name:  bar
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_THIS                                       $0      
          1        ISSET_ISEMPTY_PROP_OBJ                                   $0, 'bar'
          2      > JMPZ                                                     ~1, ->5
          3    >   QM_ASSIGN                                        ~2      'x'
          4      > JMP                                                      ->6
          5    >   QM_ASSIGN                                        ~2      'y'
          6    > > RETURN                                                   ~2
   10     7*     > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.44 ms | 1395 KiB | 15 Q