3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ($this->params['class']) // getParams and setParams only if something to add { $app = JFactory::getApplication(); $pageClass = $app->getParams()['pageclass_sfx']; if (!empty($pageClass)) // isset and not an empty string { $pageClass .= ' ' . $this->params['class']; // append new class } else { $pageClass = $this->params['class']; // declare new class } $app->setParams($pageClass); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 27
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/BSZnB
function name:  (null)
number of ops:  28
compiled vars:  !0 = $app, !1 = $pageClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_THIS                                       $2      
          1        FETCH_OBJ_R                                      ~3      $2, 'params'
          2        FETCH_DIM_R                                      ~4      ~3, 'class'
          3      > JMPZ                                                     ~4, ->27
    4     4    >   INIT_STATIC_METHOD_CALL                                  'JFactory', 'getApplication'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !0, $5
    5     7        INIT_METHOD_CALL                                         !0, 'getParams'
          8        DO_FCALL                                      0  $7      
          9        FETCH_DIM_R                                      ~8      $7, 'pageclass_sfx'
         10        ASSIGN                                                   !1, ~8
    6    11        ISSET_ISEMPTY_CV                                 ~10     !1
         12        BOOL_NOT                                         ~11     ~10
         13      > JMPZ                                                     ~11, ->20
    8    14    >   FETCH_THIS                                       $12     
         15        FETCH_OBJ_R                                      ~13     $12, 'params'
         16        FETCH_DIM_R                                      ~14     ~13, 'class'
         17        CONCAT                                           ~15     '+', ~14
         18        ASSIGN_OP                                     8          !1, ~15
         19      > JMP                                                      ->24
   12    20    >   FETCH_THIS                                       $17     
         21        FETCH_OBJ_R                                      ~18     $17, 'params'
         22        FETCH_DIM_R                                      ~19     ~18, 'class'
         23        ASSIGN                                                   !1, ~19
   14    24    >   INIT_METHOD_CALL                                         !0, 'setParams'
         25        SEND_VAR_EX                                              !1
         26        DO_FCALL                                      0          
   15    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.22 ms | 1395 KiB | 13 Q