3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Hello { public function sayHelloWorld() { echo 'Hello'.$this->getWorld(); } abstract public function getWorld(); } class MyHelloWorld { private $world; use Hello; public function getWorld() { return $this->world; } public function setWorld($val) { $this->world = $val; } } $World = new MyHelloWorld; $World->sayHelloWorld(); $World->setWorld('Daniel'); $World->sayHelloWorld;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVtWa
function name:  (null)
number of ops:  12
compiled vars:  !0 = $World
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'myhelloworld'
   20     1        NEW                                              $1      'MyHelloWorld'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   21     4        INIT_METHOD_CALL                                         !0, 'sayHelloWorld'
          5        DO_FCALL                                      0          
   22     6        INIT_METHOD_CALL                                         !0, 'setWorld'
          7        SEND_VAL_EX                                              'Daniel'
          8        DO_FCALL                                      0          
   23     9        FETCH_OBJ_R                                      ~6      !0, 'sayHelloWorld'
         10        FREE                                                     ~6
         11      > RETURN                                                   1

Class Hello:
Function sayhelloworld:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVtWa
function name:  sayHelloWorld
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_METHOD_CALL                                         'getWorld'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      'Hello', $0
          3        ECHO                                                     ~1
    5     4      > RETURN                                                   null

End of function sayhelloworld

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

End of function getworld

End of class Hello.

Class MyHelloWorld:
Function getworld:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVtWa
function name:  getWorld
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'world'
          1      > RETURN                                                   ~0
   14     2*     > RETURN                                                   null

End of function getworld

Function setworld:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVtWa
function name:  setWorld
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        ASSIGN_OBJ                                               'world'
          2        OP_DATA                                                  !0
   17     3      > RETURN                                                   null

End of function setworld

End of class MyHelloWorld.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.77 ms | 1399 KiB | 13 Q