3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Class Render */ class Render { /** * @var array */ private static $renderProviders = array('Fixed', 'News', 'Service'); /** * @param $pageType */ public static function renderNavigationTree($pageType) { Render::getProvider($pageType)->renderNavigationTree(); } /** * @param $pageType * @return null */ private static function getProvider($pageType) { foreach (Render::$renderProviders as $renderProvider) { if ($renderProvider::getPageType() === $pageType) { return $renderProvider; } } return 'PageNotFound'; } /** * @param $pageType * @param Smarty $smarty * @param $pageID */ public static function renderPage($pageType, Smarty $smarty, $pageID) { Render::getProvider($pageType)->renderPage($smarty, $pageID); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TfKVT
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E > > RETURN                                                   1

Class Render:
Function rendernavigationtree:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TfKVT
function name:  renderNavigationTree
number of ops:  7
compiled vars:  !0 = $pageType
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        INIT_STATIC_METHOD_CALL                                  'Render', 'getProvider'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4        INIT_METHOD_CALL                                         $1, 'renderNavigationTree'
          5        DO_FCALL                                      0          
   20     6      > RETURN                                                   null

End of function rendernavigationtree

Function getprovider:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/TfKVT
function name:  getProvider
number of ops:  15
compiled vars:  !0 = $pageType, !1 = $renderProvider
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   28     1        FETCH_STATIC_PROP_R          unknown             ~2      'renderProviders'
          2      > FE_RESET_R                                       $3      ~2, ->12
          3    > > FE_FETCH_R                                               $3, !1, ->12
   29     4    >   FETCH_CLASS                                   0  $4      !1
          5        INIT_STATIC_METHOD_CALL                                  $4, 'getPageType'
          6        DO_FCALL                                      0  $5      
          7        IS_IDENTICAL                                             !0, $5
          8      > JMPZ                                                     ~6, ->11
   30     9    >   FE_FREE                                                  $3
         10      > RETURN                                                   !1
   28    11    > > JMP                                                      ->3
         12    >   FE_FREE                                                  $3
   33    13      > RETURN                                                   'PageNotFound'
   34    14*     > RETURN                                                   null

End of function getprovider

Function renderpage:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TfKVT
function name:  renderPage
number of ops:  11
compiled vars:  !0 = $pageType, !1 = $smarty, !2 = $pageID
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   43     3        INIT_STATIC_METHOD_CALL                                  'Render', 'getProvider'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $3      
          6        INIT_METHOD_CALL                                         $3, 'renderPage'
          7        SEND_VAR_EX                                              !1
          8        SEND_VAR_EX                                              !2
          9        DO_FCALL                                      0          
   44    10      > RETURN                                                   null

End of function renderpage

End of class Render.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.89 ms | 1390 KiB | 13 Q