3v4l.org

run code in 300+ PHP versions simultaneously
<?php class getData { public $myArray = array(); function __construct() { array_push($this->myArray,"cat"); array_push($sths->myArray,"dog"); } } $p = new getData(); var_dump($p->myArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QTtWH
function name:  (null)
number of ops:  8
compiled vars:  !0 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'getData'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_FCALL                                               'var_dump'
          4        FETCH_OBJ_R                                      ~4      !0, 'myArray'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Class getData:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QTtWH
function name:  __construct
number of ops:  11
compiled vars:  !0 = $sths
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'array_push'
          1        FETCH_OBJ_W                                      $1      'myArray'
          2        SEND_REF                                                 $1
          3        SEND_VAL                                                 'cat'
          4        DO_ICALL                                                 
    9     5        INIT_FCALL                                               'array_push'
          6        FETCH_OBJ_W                                      $3      !0, 'myArray'
          7        SEND_REF                                                 $3
          8        SEND_VAL                                                 'dog'
          9        DO_ICALL                                                 
   10    10      > RETURN                                                   null

End of function __construct

End of class getData.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.86 ms | 1395 KiB | 17 Q