3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $name; public function bar() { static $a = 1; if ($a === 5) { echo PHP_EOL.$this->name.PHP_EOL; var_dump($a); return; } $a++; } } $foo1 = new Foo(); $foo1->bar(); $foo1->bar(); $foo1->bar(); $foo1->bar(); $foo1->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QW2fS
function name:  (null)
number of ops:  14
compiled vars:  !0 = $foo1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
   25     5        INIT_METHOD_CALL                                         !0, 'bar'
          6        DO_FCALL                                      0          
   26     7        INIT_METHOD_CALL                                         !0, 'bar'
          8        DO_FCALL                                      0          
   27     9        INIT_METHOD_CALL                                         !0, 'bar'
         10        DO_FCALL                                      0          
   28    11        INIT_METHOD_CALL                                         !0, 'bar'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QW2fS
function name:  bar
number of ops:  13
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   BIND_STATIC                                              !0
   11     1        IS_IDENTICAL                                             !0, 5
          2      > JMPZ                                                     ~1, ->11
   12     3    >   FETCH_OBJ_R                                      ~2      'name'
          4        CONCAT                                           ~3      '%0A', ~2
          5        CONCAT                                           ~4      ~3, '%0A'
          6        ECHO                                                     ~4
   13     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   15    10      > RETURN                                                   null
   18    11    >   PRE_INC                                                  !0
   19    12      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.28 ms | 1401 KiB | 15 Q