3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); interface SurveyAnswerInterface extends BackedEnum { public static function getQuestion(): string; } enum SituationAnswer: string implements SurveyAnswerInterface { case NEW = 'new'; case OLD = 'old'; public static function getQuestion(): string { return 'What is your situation?'; } } var_dump(SituationAnswer::NEW::getQuestion());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NUsNP
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'surveyanswerinterface'
    8     1        DECLARE_CLASS                                            'situationanswer'
   19     2        INIT_FCALL                                               'var_dump'
          3        FETCH_CLASS_CONSTANT                             ~0      'SituationAnswer', 'NEW'
          4        FETCH_CLASS                                   0  $1      ~0
          5        INIT_STATIC_METHOD_CALL                                  $1, 'getQuestion'
          6        DO_FCALL                                      0  $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class SurveyAnswerInterface:
Function getquestion:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NUsNP
function name:  getQuestion
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   VERIFY_RETURN_TYPE                                       
          1      > RETURN                                                   null

End of function getquestion

End of class SurveyAnswerInterface.

Class SituationAnswer:
Function getquestion:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NUsNP
function name:  getQuestion
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   'What+is+your+situation%3F'
   16     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function getquestion

End of class SituationAnswer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.84 ms | 1000 KiB | 14 Q