3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * This is fucking stupid */ abstract class ConfusingClass{ /** * Private property */ private $property = 'fucking stupid'; /** * Why does this keep happening? * * @bullshit true */ private static function bullshit() { return false; } public function derp() { echo self::bullshit(); } } class ConfusedBullshit extends ConfusingClass { private static function bullshit() { return $this->property; } } $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/vp8gL
function name:  (null)
number of ops:  13
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   NEW                                              $1      'ReflectionClass'
          1        SEND_VAL_EX                                              'ConfusedBullshit'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   34     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   35     7        INIT_FCALL                                               'var_dump'
          8        INIT_METHOD_CALL                                         !0, 'getProperties'
          9        DO_FCALL                                      0  $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class ConfusingClass:
Function bullshit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vp8gL
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/vp8gL
function name:  derp
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_STATIC_METHOD_CALL                                  'bullshit'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   22     3      > 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/vp8gL
function name:  bullshit
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   FETCH_THIS                                       $0      
          1        FETCH_OBJ_R                                      ~1      $0, 'property'
          2      > RETURN                                                   ~1
   29     3*     > 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/vp8gL
function name:  derp
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_STATIC_METHOD_CALL                                  'bullshit'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   22     3      > RETURN                                                   null

End of function derp

End of class ConfusedBullshit.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.34 ms | 1400 KiB | 15 Q