3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { /** * @var string */ public $name; /** * @param string */ public function __construct($name) { $this->name = $name; } /** * @return string */ public function getName() { return $this->name; } } $person = new Person(1000); var_dump($person); $anotherPerson = new Person($person); var_dump($anotherPerson);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Of6KU
function name:  (null)
number of ops:  15
compiled vars:  !0 = $person, !1 = $anotherPerson
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $2      'Person'
          1        SEND_VAL_EX                                              1000
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   29     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   32     7        NEW                                              $6      'Person'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $6
   33    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function __construct

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Of6KU
function name:  getName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1      > RETURN                                                   ~0
   24     2*     > RETURN                                                   null

End of function getname

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.12 ms | 992 KiB | 14 Q