3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar() { return new Foo; } public function display() { echo "Worked"; } } ($derp = Foo::bar()) && $derp->display();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/dAiI7
function name:  (null)
number of ops:  8
compiled vars:  !0 = $derp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'bar'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                           ~2      !0, $1
          3      > JMPZ_EX                                          ~2      ~2, ->7
          4    >   INIT_METHOD_CALL                                         !0, 'display'
          5        DO_FCALL                                      0  $3      
          6        BOOL                                             ~2      $3
          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/dAiI7
function name:  bar
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    5     3*     > RETURN                                                   null

End of function bar

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

End of function display

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.13 ms | 1398 KiB | 13 Q