3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { public $foo; public function __get($k) { echo 'Getting ' . $k . PHP_EOL; } public function __set($k, $v) { echo 'Setting ' . $k . ' = ' . $v . PHP_EOL; } protected function _makeProperty() { $this->bar = 'baz'; } public function makeProperty() { $this->_makeProperty(); } } $e = new Example(); echo (property_exists($e, 'foo') ? 'Yes' : 'No') . PHP_EOL; echo (property_exists($e, 'bar') ? 'Yes' : 'No') . PHP_EOL; $e->makeProperty(); echo (property_exists($e, 'foo') ? 'Yes' : 'No') . PHP_EOL; echo (property_exists($e, 'bar') ? 'Yes' : 'No') . PHP_EOL; echo $e->bar . PHP_EOL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 42
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 42
Branch analysis from position: 40
Branch analysis from position: 42
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
Branch analysis from position: 32
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
Branch analysis from position: 20
filename:       /in/0sunr
function name:  (null)
number of ops:  49
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'Example'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   29     3        INIT_FCALL                                               'property_exists'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 'foo'
          6        DO_ICALL                                         $4      
          7      > JMPZ                                                     $4, ->10
          8    >   QM_ASSIGN                                        ~5      'Yes'
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~5      'No'
         11    >   CONCAT                                           ~6      ~5, '%0A'
         12        ECHO                                                     ~6
   30    13        INIT_FCALL                                               'property_exists'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'bar'
         16        DO_ICALL                                         $7      
         17      > JMPZ                                                     $7, ->20
         18    >   QM_ASSIGN                                        ~8      'Yes'
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~8      'No'
         21    >   CONCAT                                           ~9      ~8, '%0A'
         22        ECHO                                                     ~9
   32    23        INIT_METHOD_CALL                                         !0, 'makeProperty'
         24        DO_FCALL                                      0          
   34    25        INIT_FCALL                                               'property_exists'
         26        SEND_VAR                                                 !0
         27        SEND_VAL                                                 'foo'
         28        DO_ICALL                                         $11     
         29      > JMPZ                                                     $11, ->32
         30    >   QM_ASSIGN                                        ~12     'Yes'
         31      > JMP                                                      ->33
         32    >   QM_ASSIGN                                        ~12     'No'
         33    >   CONCAT                                           ~13     ~12, '%0A'
         34        ECHO                                                     ~13
   35    35        INIT_FCALL                                               'property_exists'
         36        SEND_VAR                                                 !0
         37        SEND_VAL                                                 'bar'
         38        DO_ICALL                                         $14     
         39      > JMPZ                                                     $14, ->42
         40    >   QM_ASSIGN                                        ~15     'Yes'
         41      > JMP                                                      ->43
         42    >   QM_ASSIGN                                        ~15     'No'
         43    >   CONCAT                                           ~16     ~15, '%0A'
         44        ECHO                                                     ~16
   37    45        FETCH_OBJ_R                                      ~17     !0, 'bar'
         46        CONCAT                                           ~18     ~17, '%0A'
         47        ECHO                                                     ~18
         48      > RETURN                                                   1

Class Example:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0sunr
function name:  __get
number of ops:  5
compiled vars:  !0 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        CONCAT                                           ~1      'Getting+', !0
          2        CONCAT                                           ~2      ~1, '%0A'
          3        ECHO                                                     ~2
    9     4      > RETURN                                                   null

End of function __get

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0sunr
function name:  __set
number of ops:  8
compiled vars:  !0 = $k, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        CONCAT                                           ~2      'Setting+', !0
          3        CONCAT                                           ~3      ~2, '+%3D+'
          4        CONCAT                                           ~4      ~3, !1
          5        CONCAT                                           ~5      ~4, '%0A'
          6        ECHO                                                     ~5
   14     7      > RETURN                                                   null

End of function __set

Function _makeproperty:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0sunr
function name:  _makeProperty
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ASSIGN_OBJ                                               'bar'
          1        OP_DATA                                                  'baz'
   19     2      > RETURN                                                   null

End of function _makeproperty

Function makeproperty:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0sunr
function name:  makeProperty
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_METHOD_CALL                                         '_makeProperty'
          1        DO_FCALL                                      0          
   24     2      > RETURN                                                   null

End of function makeproperty

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.27 ms | 1404 KiB | 15 Q