3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __get( $property ) { if ( 'bla' === $property ) { echo 'Initializing Text->bla' . PHP_EOL; $this->bla = 'Value'; return $this->bla; } $trace = debug_backtrace(); trigger_error( 'Undefined property via __get(): ' . $property . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_NOTICE); return null; } } $test = new Test(); echo $test->bla . PHP_EOL; echo $test->bla . PHP_EOL; echo $test->bla . PHP_EOL; echo $test->kaka . PHP_EOL; echo $test->bla . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pGlHn
function name:  (null)
number of ops:  19
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        FETCH_OBJ_R                                      ~4      !0, 'bla'
          4        CONCAT                                           ~5      ~4, '%0A'
          5        ECHO                                                     ~5
   24     6        FETCH_OBJ_R                                      ~6      !0, 'bla'
          7        CONCAT                                           ~7      ~6, '%0A'
          8        ECHO                                                     ~7
   25     9        FETCH_OBJ_R                                      ~8      !0, 'bla'
         10        CONCAT                                           ~9      ~8, '%0A'
         11        ECHO                                                     ~9
   26    12        FETCH_OBJ_R                                      ~10     !0, 'kaka'
         13        CONCAT                                           ~11     ~10, '%0A'
         14        ECHO                                                     ~11
   27    15        FETCH_OBJ_R                                      ~12     !0, 'bla'
         16        CONCAT                                           ~13     ~12, '%0A'
         17        ECHO                                                     ~13
         18      > RETURN                                                   1

Class Test:
Function __get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pGlHn
function name:  __get
number of ops:  26
compiled vars:  !0 = $property, !1 = $trace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        IS_IDENTICAL                                             !0, 'bla'
          2      > JMPZ                                                     ~2, ->8
    6     3    >   ECHO                                                     'Initializing+Text-%3Ebla%0A'
    7     4        ASSIGN_OBJ                                               'bla'
          5        OP_DATA                                                  'Value'
    8     6        FETCH_OBJ_R                                      ~4      'bla'
          7      > RETURN                                                   ~4
   11     8    >   INIT_FCALL                                               'debug_backtrace'
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
   12    11        INIT_FCALL                                               'trigger_error'
   13    12        CONCAT                                           ~7      'Undefined+property+via+__get%28%29%3A+', !0
   14    13        CONCAT                                           ~8      ~7, '+in+'
         14        FETCH_DIM_R                                      ~9      !1, 0
         15        FETCH_DIM_R                                      ~10     ~9, 'file'
         16        CONCAT                                           ~11     ~8, ~10
   15    17        CONCAT                                           ~12     ~11, '+on+line+'
         18        FETCH_DIM_R                                      ~13     !1, 0
         19        FETCH_DIM_R                                      ~14     ~13, 'line'
         20        CONCAT                                           ~15     ~12, ~14
         21        SEND_VAL                                                 ~15
   16    22        SEND_VAL                                                 1024
         23        DO_ICALL                                                 
   17    24      > RETURN                                                   null
   18    25*     > RETURN                                                   null

End of function __get

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.36 ms | 1400 KiB | 17 Q