3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { /** * @var string */ private $methodName; /** * @param string $methodName * @param array $parameters */ public function __construct($methodName, array $parameters = []) { $this->methodName = (string) $methodName; $this->parameters = $parameters; } public static function constructor(array $parameters = []) { return new self('__construct', $parameters); } } $test = Test::constructor()->constructor();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dKVqk
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_STATIC_METHOD_CALL                                  'Test', 'constructor'
          1        DO_FCALL                                      0  $1      
          2        INIT_METHOD_CALL                                         $1, 'constructor'
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
          5      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dKVqk
function name:  __construct
number of ops:  8
compiled vars:  !0 = $methodName, !1 = $parameters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
   15     2        CAST                                          6  ~3      !0
          3        ASSIGN_OBJ                                               'methodName'
          4        OP_DATA                                                  ~3
   16     5        ASSIGN_OBJ                                               'parameters'
          6        OP_DATA                                                  !1
   17     7      > RETURN                                                   null

End of function __construct

Function constructor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dKVqk
function name:  constructor
number of ops:  7
compiled vars:  !0 = $parameters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV_INIT                                        !0      <array>
   21     1        NEW                          self                $1      
          2        SEND_VAL_EX                                              '__construct'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5      > RETURN                                                   $1
   22     6*     > RETURN                                                   null

End of function constructor

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.62 ms | 1385 KiB | 13 Q