3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { return 42; } } $foo = new Foo(); $bar = 42; for ($i = 5; $i; $i--) { var_dump($bar); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
Branch analysis from position: 6
filename:       /in/6erW5
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo, !1 = $bar, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   12     3        ASSIGN                                                   !1, 42
   14     4        ASSIGN                                                   !2, 5
          5      > JMP                                                      ->10
   15     6    >   INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   14     9        PRE_DEC                                                  !2
         10    > > JMPNZ                                                    !2, ->6
   16    11    > > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6erW5
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   42
    8     1*     > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.97 ms | 1395 KiB | 15 Q