3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { private $name; private function __construct($name) { $this->name = $name; } public static function register($name) { return new Person($name); } } $person = Person::register($name);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cnDFm
function name:  (null)
number of ops:  5
compiled vars:  !0 = $person, !1 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'Person', 'register'
          1        SEND_VAR                                                 !1
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
          4      > RETURN                                                   1

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

End of function __construct

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

End of function register

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.89 ms | 1385 KiB | 13 Q