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.'<br />'.self::NICE; } public static $NICE; }; $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/sY9LD
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'dupa'
          1        SEND_VAL_EX                                              'blabla'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   14     4        FETCH_OBJ_R                                      ~5      !0, 'a'
          5        ECHO                                                     ~5
   15     6        NEW                                              $6      'dupa'
          7        SEND_VAL_EX                                              ''
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $6
   16    10        FETCH_OBJ_R                                      ~9      !1, 'a'
         11        ECHO                                                     ~9
         12      > RETURN                                                   1

Class dupa:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sY9LD
function name:  __construct
number of ops:  10
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        CONCAT                                           ~4      ~3, '%3Cbr+%2F%3E'
          6        FETCH_CLASS_CONSTANT                             ~5      'NICE'
          7        CONCAT                                           ~6      ~4, ~5
          8        ECHO                                                     ~6
    8     9      > RETURN                                                   null

End of function __construct

End of class dupa.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.19 ms | 1394 KiB | 13 Q