3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Dumb { readonly int $unreliable; function __construct() { unset($this->unreliable); } function __get($key) { return random_int(0, 999); } } $rubbish = new Dumb; var_dump($rubbish->unreliable); var_dump($rubbish->unreliable);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N78An
function name:  (null)
number of ops:  12
compiled vars:  !0 = $rubbish
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Dumb'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_FCALL                                               'var_dump'
          4        FETCH_OBJ_R                                      ~4      !0, 'unreliable'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
   19     7        INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_R                                      ~6      !0, 'unreliable'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class Dumb:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N78An
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   UNSET_OBJ                                                'unreliable'
    9     1      > RETURN                                                   null

End of function __construct

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N78An
function name:  __get
number of ops:  7
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'random_int'
          2        SEND_VAL                                                 0
          3        SEND_VAL                                                 999
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
   13     6*     > RETURN                                                   null

End of function __get

End of class Dumb.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.5 ms | 999 KiB | 15 Q