3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public $name; public function __construct($name) { $this->name = $name; } public function name($name) { return $this->name($name); } } $user = new Person('chris'); var_dump($user->name());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8n67u
function name:  (null)
number of ops:  10
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Person'
          1        SEND_VAL_EX                                              'chris'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   21     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'name'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class Person:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8n67u
function name:  __construct
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               'name'
          2        OP_DATA                                                  !0
    9     3      > 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/8n67u
function name:  name
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        INIT_METHOD_CALL                                         'name'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
   14     5*     > RETURN                                                   null

End of function name

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.48 ms | 1395 KiB | 15 Q