3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar($der=false) { if ($der) return new Foo; } public function display() { echo "worked"; } } Foo::bar()->display();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TAJuG
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'bar'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, 'display'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TAJuG
function name:  bar
number of ops:  6
compiled vars:  !0 = $der
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      <false>
    4     1      > JMPZ                                                     !0, ->5
          2    >   NEW                                              $1      'Foo'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   $1
    5     5    > > 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/TAJuG
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:
155.02 ms | 1394 KiB | 13 Q