3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface IRouteBuilder { public function __construct($culture, $brand, $country); public function getRoute(sfWebRequest $request); } abstract class AbstractRouteBuilder implements IRouteBuilder { protected $culture; protected $brand; protected $country; public function __construct($culture, $brand, $country) { $this->culture = $culture; $this->brand = $brand; $this->country = $country; echo 'toto'; } abstract public function getRoute(sfWebRequest $request); protected function assertMandatoryParameters(array $parameters, sfWebRequest $request) { foreach ($parameters as $parameter) { if (is_null($request->getGetParameter($parameter))) { throw new Exception(sprintf('Missing parameter "%s"', $parameter)); } } } protected function generateUrl($route, $params) { return sfContext::getInstance()->getRouting()->generate($route, $params, true); } } new AbstractRouteBuilder('fr', 'tha', 'FR');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LuBV7
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'abstractroutebuilder'
   39     1        NEW                                              $0      'AbstractRouteBuilder'
          2        SEND_VAL_EX                                              'fr'
          3        SEND_VAL_EX                                              'tha'
          4        SEND_VAL_EX                                              'FR'
          5        DO_FCALL                                      0          
          6        FREE                                                     $0
          7      > RETURN                                                   1

Class IRouteBuilder:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LuBV7
function name:  __construct
number of ops:  4
compiled vars:  !0 = $culture, !1 = $brand, !2 = $country
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3      > RETURN                                                   null

End of function __construct

Function getroute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LuBV7
function name:  getRoute
number of ops:  2
compiled vars:  !0 = $request
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function getroute

End of class IRouteBuilder.

Class AbstractRouteBuilder:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LuBV7
function name:  __construct
number of ops:  11
compiled vars:  !0 = $culture, !1 = $brand, !2 = $country
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   15     3        ASSIGN_OBJ                                               'culture'
          4        OP_DATA                                                  !0
   16     5        ASSIGN_OBJ                                               'brand'
          6        OP_DATA                                                  !1
   17     7        ASSIGN_OBJ                                               'country'
          8        OP_DATA                                                  !2
   18     9        ECHO                                                     'toto'
   19    10      > RETURN                                                   null

End of function __construct

Function getroute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LuBV7
function name:  getRoute
number of ops:  2
compiled vars:  !0 = $request
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function getroute

Function assertmandatoryparameters:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/LuBV7
function name:  assertMandatoryParameters
number of ops:  20
compiled vars:  !0 = $parameters, !1 = $request, !2 = $parameter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   25     2      > FE_RESET_R                                       $3      !0, ->18
          3    > > FE_FETCH_R                                               $3, !2, ->18
   27     4    >   INIT_METHOD_CALL                                         !1, 'getGetParameter'
          5        SEND_VAR_EX                                              !2
          6        DO_FCALL                                      0  $4      
          7        TYPE_CHECK                                    2          $4
          8      > JMPZ                                                     ~5, ->17
   29     9    >   NEW                                              $6      'Exception'
         10        INIT_FCALL                                               'sprintf'
         11        SEND_VAL                                                 'Missing+parameter+%22%25s%22'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $7      
         14        SEND_VAR_NO_REF_EX                                       $7
         15        DO_FCALL                                      0          
         16      > THROW                                         0          $6
   25    17    > > JMP                                                      ->3
         18    >   FE_FREE                                                  $3
   32    19      > RETURN                                                   null

End of function assertmandatoryparameters

Function generateurl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LuBV7
function name:  generateUrl
number of ops:  13
compiled vars:  !0 = $route, !1 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   36     2        INIT_STATIC_METHOD_CALL                                  'sfContext', 'getInstance'
          3        DO_FCALL                                      0  $2      
          4        INIT_METHOD_CALL                                         $2, 'getRouting'
          5        DO_FCALL                                      0  $3      
          6        INIT_METHOD_CALL                                         $3, 'generate'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !1
          9        SEND_VAL_EX                                              <true>
         10        DO_FCALL                                      0  $4      
         11      > RETURN                                                   $4
   37    12*     > RETURN                                                   null

End of function generateurl

End of class AbstractRouteBuilder.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.96 ms | 1396 KiB | 15 Q