3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MaritalStatusProvider { const SINGLE = 'choices.maritalStatus.single'; const MARRIED = 'choices.maritalStatus.married'; const WIDOW = 'choices.maritalStatus.widow'; const DIVORCED = 'choices.maritalStatus.divorced'; private static $maritalStatusKeys = array( self::SINGLE, self::MARRIED, self::WIDOW, self::DIVORCED ); /** * Get Type Choices * * @return array */ public static function getTypeChoices() { return array_combine(self::$maritalStatusKeys, self::$maritalStatusKeys); } } $getMaritalStatus = ''; if ($getMaritalStatus == null || !in_array($getMaritalStatus, array(MaritalStatusProvider::SINGLE, MaritalStatusProvider::WIDOW)) ) { return array('titular', 'next', 'save'); } else { return array('titular', 'next', 'save', 'married'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/FcRaj
function name:  (null)
number of ops:  11
compiled vars:  !0 = $getMaritalStatus
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   ASSIGN                                                   !0, ''
   27     1        IS_EQUAL                                         ~2      !0, null
          2      > JMPNZ_EX                                         ~2      ~2, ->6
   28     3    >   IN_ARRAY                                         ~3      !0, <array>
          4        BOOL_NOT                                         ~4      ~3
          5        BOOL                                             ~2      ~4
          6    > > JMPZ                                                     ~2, ->9
   30     7    > > RETURN                                                   <array>
          8*       JMP                                                      ->10
   32     9    > > RETURN                                                   <array>
   33    10*     > RETURN                                                   1

Class MaritalStatusProvider:
Function gettypechoices:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FcRaj
function name:  getTypeChoices
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_FCALL                                               'array_combine'
          1        FETCH_STATIC_PROP_R          global lock         ~0      'maritalStatusKeys'
          2        SEND_VAL                                                 ~0
          3        FETCH_STATIC_PROP_R          unknown             ~1      'maritalStatusKeys'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
   24     7*     > RETURN                                                   null

End of function gettypechoices

End of class MaritalStatusProvider.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.03 ms | 1395 KiB | 15 Q