3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public $value = 0; function test() { $this->value = 1; } function __construct() { $this->value = 2; }} $object = new test(); echo $object->value; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JfQKb
function name:  (null)
number of ops:  6
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   10     3        FETCH_OBJ_R                                      ~4      !0, 'value'
          4        ECHO                                                     ~4
   11     5      > RETURN                                                   1

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

End of function test

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

End of function __construct

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.56 ms | 1385 KiB | 13 Q