3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $v = null; function __construct($v){ $this->v = $v; } function __destruct() { echo $this->v . "\n"; } } $a = new A(2); $a = new A(3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bohi7
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'A'
          1        SEND_VAL_EX                                              2
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   12     4        NEW                                              $4      'A'
          5        SEND_VAL_EX                                              3
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $4
          8      > RETURN                                                   1

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

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bohi7
function name:  __destruct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~0      'v'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    9     3      > RETURN                                                   null

End of function __destruct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.06 ms | 1394 KiB | 13 Q