3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { static $baz; var_dump($baz); $baz = new \stdClass; var_dump($baz); } } $f = new Foo; $f->bar(); $f->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VMGvF
function name:  (null)
number of ops:  8
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
   14     5        INIT_METHOD_CALL                                         !0, 'bar'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VMGvF
function name:  bar
number of ops:  11
compiled vars:  !0 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_STATIC                                              !0
    6     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    7     4        NEW                                              $2      'stdClass'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
    8     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    9    10      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.01 ms | 1395 KiB | 15 Q