3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $a; public function __construct(int $a) { $this->a = $a; } } $foo = new Foo(1); $bar = new $foo(2); var_dump($foo); var_dump($bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HLN7O
function name:  (null)
number of ops:  16
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'Foo'
          1        SEND_VAL_EX                                              1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   16     4        FETCH_CLASS                                   0  $5      !0
          5        NEW                                              $6      $5
          6        SEND_VAL_EX                                              2
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
   17     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   18    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

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

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.48 ms | 1395 KiB | 15 Q