3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { const BAR = 1; protected $message = BAR; public function __construct($message) { $this->message = $message; echo "Initialized with {$this->message}"; } } $var = new Foo(Foo::BAR);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/28Pg6
function name:  (null)
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Foo'
          1        SEND_VAL_EX                                              1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/28Pg6
function name:  __construct
number of ops:  8
compiled vars:  !0 = $message
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ASSIGN_OBJ                                               'message'
          2        OP_DATA                                                  !0
   11     3        NOP                                                      
          4        FETCH_OBJ_R                                      ~2      'message'
          5        FAST_CONCAT                                      ~3      'Initialized+with+', ~2
          6        ECHO                                                     ~3
   12     7      > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.19 ms | 933 KiB | 14 Q