3v4l.org

run code in 300+ PHP versions simultaneously
<?php class dupa { public $a = 'j'; public function __construct($param) { $this->a = $param; echo '+_construct'.$this->a; } }; $a = new dupa('blabla'); echo $a->a; $b = new dupa; echo $b->a;?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NblQc
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'dupa'
          1        SEND_VAL_EX                                              'blabla'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   13     4        FETCH_OBJ_R                                      ~5      !0, 'a'
          5        ECHO                                                     ~5
   14     6        NEW                                              $6      'dupa'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
   15     9        FETCH_OBJ_R                                      ~9      !1, 'a'
         10        ECHO                                                     ~9
         11      > RETURN                                                   1

Class dupa:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NblQc
function name:  __construct
number of ops:  7
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN_OBJ                                               'a'
          2        OP_DATA                                                  !0
    7     3        FETCH_OBJ_R                                      ~2      'a'
          4        CONCAT                                           ~3      '%2B_construct', ~2
          5        ECHO                                                     ~3
    8     6      > RETURN                                                   null

End of function __construct

End of class dupa.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.8 ms | 1393 KiB | 13 Q