3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $a; private $b; public function __construct($a,$b){ $this->a=$a; $this->b=$b; } public function __destruct(){ echo $this->a+$this->b; } } new Foo(1,2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ttlJE
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $0      'Foo'
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              2
          3        DO_FCALL                                      0          
          4        FREE                                                     $0
          5      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ttlJE
function name:  __construct
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        ASSIGN_OBJ                                               'a'
          3        OP_DATA                                                  !0
    7     4        ASSIGN_OBJ                                               'b'
          5        OP_DATA                                                  !1
    8     6      > 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/ttlJE
function name:  __destruct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        FETCH_OBJ_R                                      ~1      'b'
          2        ADD                                              ~2      ~0, ~1
          3        ECHO                                                     ~2
   11     4      > RETURN                                                   null

End of function __destruct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.42 ms | 1394 KiB | 13 Q