3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $baz = 'baz'; public static $qux = 'qux'; public static function foobar() { echo 'foobar' . PHP_EOL; } public function foo() { echo 'foo' . PHP_EOL; return $this; } public function bar() { $this::foo()->foo()::foo(); $this::foobar(); $this->foo()::foo(); $this->foobar(); } } $a = new A(); $a->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1dTbq
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   30     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function foobar

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1dTbq
function name:  foo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'foo%0A'
   16     1        FETCH_THIS                                       ~0      
          2      > RETURN                                                   ~0
   17     3*     > RETURN                                                   null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1dTbq
function name:  bar
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   FETCH_THIS                                       ~0      
          1        FETCH_CLASS                                   0  $1      ~0
          2        INIT_STATIC_METHOD_CALL                                  $1, 'foo'
          3        DO_FCALL                                      0  $2      
          4        INIT_METHOD_CALL                                         $2, 'foo'
          5        DO_FCALL                                      0  $3      
          6        FETCH_CLASS                                   0  $4      $3
          7        INIT_STATIC_METHOD_CALL                                  $4, 'foo'
          8        DO_FCALL                                      0          
   22     9        FETCH_THIS                                       ~6      
         10        FETCH_CLASS                                   0  $7      ~6
         11        INIT_STATIC_METHOD_CALL                                  $7, 'foobar'
         12        DO_FCALL                                      0          
   24    13        INIT_METHOD_CALL                                         'foo'
         14        DO_FCALL                                      0  $9      
         15        FETCH_CLASS                                   0  $10     $9
         16        INIT_STATIC_METHOD_CALL                                  $10, 'foo'
         17        DO_FCALL                                      0          
   25    18        INIT_METHOD_CALL                                         'foobar'
         19        DO_FCALL                                      0          
   26    20      > RETURN                                                   null

End of function bar

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.85 ms | 1399 KiB | 13 Q