3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person{ protected $name; public function __construct (string $name = null){ $this->setName($name); } public function setName(string $name){ $this->name = $name; } public function saySomething(){ echo $this->name . ' says something!'; } } $me = new Person("Konrad"); $me->saySomething();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c5sVZ
function name:  (null)
number of ops:  7
compiled vars:  !0 = $me
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Person'
          1        SEND_VAL_EX                                              'Konrad'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   17     4        INIT_METHOD_CALL                                         !0, 'saySomething'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Person:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c5sVZ
function name:  __construct
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      null
    6     1        INIT_METHOD_CALL                                         'setName'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    7     4      > RETURN                                                   null

End of function __construct

Function setname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c5sVZ
function name:  setName
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ASSIGN_OBJ                                               'name'
          2        OP_DATA                                                  !0
   11     3      > RETURN                                                   null

End of function setname

Function saysomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c5sVZ
function name:  saySomething
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1        CONCAT                                           ~1      ~0, '+says+something%21'
          2        ECHO                                                     ~1
   14     3      > RETURN                                                   null

End of function saysomething

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.1 ms | 940 KiB | 14 Q