3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $a; private $b; public function __construct() { echo 'DA'; } public function getA() {return $this->a;} public function getB() {return $this->b;} public function setA($a) {$this->a = $a;} public function setB($b) {$this->b = $b;} } $class = new ReflectionClass('Foo'); $instance = $class->newInstanceWithoutConstructor(); var_dump($instance);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/30RCE
function name:  (null)
number of ops:  11
compiled vars:  !0 = $class, !1 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   21     4        INIT_METHOD_CALL                                         !0, 'newInstanceWithoutConstructor'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
   23     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/30RCE
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'DA'
   11     1      > RETURN                                                   null

End of function __construct

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

End of function geta

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

End of function getb

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

End of function seta

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

End of function setb

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.79 ms | 1400 KiB | 15 Q