3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * This is fucking stupid */ class ConfusingClass{ /** * Private property */ private $property = 'fucking stupid'; /** * Why does this keep happening? * * @bullshit true */ private function bullshit() { return false; } public function derp() { echo "test: ", $this->bullshit(), "\n"; } } class ConfusedBullshit extends ConfusingClass { private function bullshit() { return $this->property; } } $f = new ConfusedBullshit; $f->derp(); $d = new ReflectionClass('ConfusedBullshit'); var_dump($d); var_dump($d->getProperties());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oCRSI
function name:  (null)
number of ops:  18
compiled vars:  !0 = $f, !1 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   NEW                                              $2      'ConfusedBullshit'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   38     3        INIT_METHOD_CALL                                         !0, 'derp'
          4        DO_FCALL                                      0          
   40     5        NEW                                              $6      'ReflectionClass'
          6        SEND_VAL_EX                                              'ConfusedBullshit'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
   41     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   42    12        INIT_FCALL                                               'var_dump'
         13        INIT_METHOD_CALL                                         !1, 'getProperties'
         14        DO_FCALL                                      0  $10     
         15        SEND_VAR                                                 $10
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Class ConfusingClass:
Function bullshit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oCRSI
function name:  bullshit
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E > > RETURN                                                   <false>
   18     1*     > RETURN                                                   null

End of function bullshit

Function derp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oCRSI
function name:  derp
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'test%3A+'
   22     1        INIT_METHOD_CALL                                         'bullshit'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   23     4        ECHO                                                     '%0A'
   24     5      > RETURN                                                   null

End of function derp

End of class ConfusingClass.

Class ConfusedBullshit:
Function bullshit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oCRSI
function name:  bullshit
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   FETCH_OBJ_R                                      ~0      'property'
          1      > RETURN                                                   ~0
   32     2*     > RETURN                                                   null

End of function bullshit

Function derp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oCRSI
function name:  derp
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'test%3A+'
   22     1        INIT_METHOD_CALL                                         'bullshit'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   23     4        ECHO                                                     '%0A'
   24     5      > RETURN                                                   null

End of function derp

End of class ConfusedBullshit.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.97 ms | 1400 KiB | 15 Q