3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public $name; public function __construct() { $this->name(); } public function name($name) { $this->name = new Person; return $name; } } echo person()->name('chris');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FtcHS
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL_BY_NAME                                       'person'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, 'name'
          3        SEND_VAL_EX                                              'chris'
          4        DO_FCALL                                      0  $1      
          5        ECHO                                                     $1
          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/FtcHS
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_METHOD_CALL                                         'name'
          1        DO_FCALL                                      0          
   11     2      > RETURN                                                   null

End of function __construct

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

End of function name

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.21 ms | 1394 KiB | 13 Q