3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct() { $class = __CLASS__; echo 'construct '.$class; } public static function create() { $class = __CLASS__; $obj = new $class(); return $obj; } public function hello() { echo 'hello world'; } } A::create()->hello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mDOjl
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'create'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, 'hello'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mDOjl
function name:  __construct
number of ops:  4
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'A'
    6     1        CONCAT                                           ~2      'construct+', !0
          2        ECHO                                                     ~2
    7     3      > RETURN                                                   null

End of function __construct

Function create:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mDOjl
function name:  create
number of ops:  7
compiled vars:  !0 = $class, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 'A'
   11     1        FETCH_CLASS                                   0  $3      !0
          2        NEW                                              $4      $3
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   12     5      > RETURN                                                   !1
   13     6*     > RETURN                                                   null

End of function create

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

End of function hello

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.51 ms | 1395 KiB | 13 Q