3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Project { const PROJECT_NAME_Funrize = 'Funrize'; const PROJECT_NAME_FunzCity = 'FunzCity'; const PROJECT_NAME_JackpotRabbit = 'JackpotRabbit'; const PROJECT_NAME_Sweepico = 'Sweepico'; const PROJECT_NAME_MrGoodwin = 'MrGoodwin'; const PROJECT_NAME_Mysweepz = 'Mysweepz'; const PROJECT_NAME_Prizeville = 'Prizeville'; const PROJECT_NAME_Cardrize = 'Cardrize'; const PROJECT_ALIASE_FUNRIZE = 'FUN'; const PROJECT_ALIASE_FUNZ_CITY = 'FNC'; const PROJECT_ALIASE_JACKPOT_RABBIT = 'JPR'; const PROJECT_ALIASE_SWEEPICO = 'SWP'; const PROJECT_ALIASE_MR_GOODWIN = 'MRG'; const PROJECT_ALIASE_MYSWEEPZ = 'MYS'; const PROJECT_ALIASE_PRIZEVILLE = 'PRV'; const PROJECT_ALIASE_CARDRIZE = 'CDR'; public static function getProjectNamesWithAliases(): array { return [ Project::PROJECT_NAME_Funrize => Project::PROJECT_ALIASE_FUNRIZE, Project::PROJECT_NAME_FunzCity => Project::PROJECT_ALIASE_FUNZ_CITY, Project::PROJECT_NAME_JackpotRabbit => Project::PROJECT_ALIASE_JACKPOT_RABBIT, Project::PROJECT_NAME_Sweepico => Project::PROJECT_ALIASE_SWEEPICO, Project::PROJECT_NAME_MrGoodwin => Project::PROJECT_ALIASE_MR_GOODWIN, Project::PROJECT_NAME_Mysweepz => Project::PROJECT_ALIASE_MYSWEEPZ, Project::PROJECT_NAME_Prizeville => Project::PROJECT_ALIASE_PRIZEVILLE, Project::PROJECT_NAME_Cardrize=> Project::PROJECT_ALIASE_CARDRIZE, ]; } public static function getProjectAliaseByProjectName(string $projectName): string { if (!isset(self::getProjectNamesWithAliases()[$projectName])) { throw new \InvalidArgumentException('Invalid project name'); } return self::getProjectNamesWithAliases()[$projectName]; } } //issuetype != Epic //AND project IN ({Projects}) //AND status NOT IN (Done, Reject, Rejected, "On Prod") //AND sprint IN ( // "{Project_name} future sprint", // "{Project_name} future sprint1", // "{Project_name} future sprint2" //) //AND component = "Back-end" ///issuetype != Epic AND sprint = "FNC Sprint 01.09-15.09" $springRengers = '01.09-15.09'; $jql = 'issuetype != Epic' . ' AND project IN ({Projects})' . ' AND status NOT IN (Done, Reject, Rejected, "On Prod", "In Review", "Ready for QA", "In QA", "Ready for RC", "Ready for Release")' . ' AND sprint IN ({Sprints})'; $projects = []; foreach (Project::getProjectNamesWithAliases() as $projectName => $projectAlias) { $projects[] = $projectName; } $jql = str_replace('{Projects}', implode(',', $projects), $jql); $sprints = []; foreach (Project::getProjectNamesWithAliases() as $projectName => $projectAlias) { $sprints[] = "\"" . $projectAlias . ' Sprint ' . $springRengers . "\""; $sprints[] = "\"" . $projectAlias . ' future sprint' . "\""; $sprints[] = "\"" . $projectAlias . ' future sprint1' . "\""; } $jql = str_replace('{Sprints}', implode(',', $sprints), $jql); echo $jql;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 39
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 39
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 11
filename:       /in/SsWoK
function name:  (null)
number of ops:  46
compiled vars:  !0 = $springRengers, !1 = $jql, !2 = $projects, !3 = $projectAlias, !4 = $projectName, !5 = $sprints
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   58     0  E >   ASSIGN                                                       !0, '01.09-15.09'
   60     1        ASSIGN                                                       !1, 'issuetype+%21%3D+Epic+AND+project+IN+%28%7BProjects%7D%29+AND+status+NOT+IN+%28Done%2C+Reject%2C+Rejected%2C+%22On+Prod%22%2C+%22In+Review%22%2C+%22Ready+for+QA%22%2C+%22In+QA%22%2C+%22Ready+for+RC%22%2C+%22Ready+for+Release%22%29+AND+sprint+IN+%28%7BSprints%7D%29'
   65     2        ASSIGN                                                       !2, <array>
   66     3        INIT_STATIC_METHOD_CALL                                      'Project', 'getProjectNamesWithAliases'
          4        DO_FCALL                                          0  $9      
          5      > FE_RESET_R                                           $10     $9, ->11
          6    > > FE_FETCH_R                                           ~11     $10, !3, ->11
          7    >   ASSIGN                                                       !4, ~11
   67     8        ASSIGN_DIM                                                   !2
          9        OP_DATA                                                      !4
   66    10      > JMP                                                          ->6
         11    >   FE_FREE                                                      $10
   70    12        FRAMELESS_ICALL_2                implode             ~14     '%2C', !2
         13        FRAMELESS_ICALL_3                str_replace         ~15     '%7BProjects%7D', ~14
         14        OP_DATA                                                      !1
         15        ASSIGN                                                       !1, ~15
   72    16        ASSIGN                                                       !5, <array>
   73    17        INIT_STATIC_METHOD_CALL                                      'Project', 'getProjectNamesWithAliases'
         18        DO_FCALL                                          0  $18     
         19      > FE_RESET_R                                           $19     $18, ->39
         20    > > FE_FETCH_R                                           ~20     $19, !3, ->39
         21    >   ASSIGN                                                       !4, ~20
   74    22        CONCAT                                               ~23     '%22', !3
         23        CONCAT                                               ~24     ~23, '+Sprint+'
         24        CONCAT                                               ~25     ~24, !0
         25        CONCAT                                               ~26     ~25, '%22'
         26        ASSIGN_DIM                                                   !5
         27        OP_DATA                                                      ~26
   75    28        CONCAT                                               ~28     '%22', !3
         29        CONCAT                                               ~29     ~28, '+future+sprint'
         30        CONCAT                                               ~30     ~29, '%22'
         31        ASSIGN_DIM                                                   !5
         32        OP_DATA                                                      ~30
   76    33        CONCAT                                               ~32     '%22', !3
         34        CONCAT                                               ~33     ~32, '+future+sprint1'
         35        CONCAT                                               ~34     ~33, '%22'
         36        ASSIGN_DIM                                                   !5
         37        OP_DATA                                                      ~34
   73    38      > JMP                                                          ->20
         39    >   FE_FREE                                                      $19
   79    40        FRAMELESS_ICALL_2                implode             ~35     '%2C', !5
         41        FRAMELESS_ICALL_3                str_replace         ~36     '%7BSprints%7D', ~35
         42        OP_DATA                                                      !1
         43        ASSIGN                                                       !1, ~36
   81    44        ECHO                                                         !1
   82    45      > RETURN                                                       1

Class Project:
Function getprojectnameswithaliases:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SsWoK
function name:  getProjectNamesWithAliases
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   26     0  E > > RETURN                                                       <array>
   35     1*       VERIFY_RETURN_TYPE                                           
          2*     > RETURN                                                       null

End of function getprojectnameswithaliases

Function getprojectaliasebyprojectname:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SsWoK
function name:  getProjectAliaseByProjectName
number of ops:  17
compiled vars:  !0 = $projectName
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   37     0  E >   RECV                                                 !0      
   39     1        INIT_STATIC_METHOD_CALL                                      'getProjectNamesWithAliases'
          2        DO_FCALL                                          0  $1      
          3        ISSET_ISEMPTY_DIM_OBJ                             0  ~2      $1, !0
          4        BOOL_NOT                                             ~3      ~2
          5      > JMPZ                                                         ~3, ->10
   40     6    >   NEW                                                  $4      'InvalidArgumentException'
          7        SEND_VAL_EX                                                  'Invalid+project+name'
          8        DO_FCALL                                          0          
          9      > THROW                                             0          $4
   42    10    >   INIT_STATIC_METHOD_CALL                                      'getProjectNamesWithAliases'
         11        DO_FCALL                                          0  $6      
         12        FETCH_DIM_R                                          ~7      $6, !0
         13        VERIFY_RETURN_TYPE                                           ~7
         14      > RETURN                                                       ~7
   43    15*       VERIFY_RETURN_TYPE                                           
         16*     > RETURN                                                       null

End of function getprojectaliasebyprojectname

End of class Project.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
148.78 ms | 858 KiB | 8 Q