3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public $memvar; public function __construct($a=1) { $a = 100; $this->memvar = ++$a; } public function PlusOne() { return $this->memvar; } } $o = new test($a=25); var_dump($a);// 126?
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sZjjq
function name:  (null)
number of ops:  9
compiled vars:  !0 = $o, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'test'
          1        ASSIGN                                           ~3      !1, 25
          2        SEND_VAL_EX                                              ~3
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   16     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sZjjq
function name:  __construct
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      1
    6     1        ASSIGN                                                   !0, 100
    7     2        PRE_INC                                          ~3      !0
          3        ASSIGN_OBJ                                               'memvar'
          4        OP_DATA                                                  ~3
    8     5      > RETURN                                                   null

End of function __construct

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

End of function plusone

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.53 ms | 1395 KiB | 15 Q