3v4l.org

run code in 300+ PHP versions simultaneously
<?php # Example enviroment to replecate yours class Drupal { public static function routeMatch() { return new DrupalExample(); } } class DrupalExample { public function getRouteName() { return 'foo'; } public function getRawParameters($foo) { return 'bar'; } } echo ($route = Drupal::routeMatch())->getRouteName(); # foo echo $route->getRawParameters('taxonomy_term'); # bar
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pAlaa
function name:  (null)
number of ops:  11
compiled vars:  !0 = $route
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  'Drupal', 'routeMatch'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                           ~2      !0, $1
          3        INIT_METHOD_CALL                                         ~2, 'getRouteName'
          4        DO_FCALL                                      0  $3      
          5        ECHO                                                     $3
   14     6        INIT_METHOD_CALL                                         !0, 'getRawParameters'
          7        SEND_VAL_EX                                              'taxonomy_term'
          8        DO_FCALL                                      0  $4      
          9        ECHO                                                     $4
         10      > RETURN                                                   1

Class Drupal:
Function routematch:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pAlaa
function name:  routeMatch
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $0      'DrupalExample'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function routematch

End of class Drupal.

Class DrupalExample:
Function getroutename:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pAlaa
function name:  getRouteName
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   'foo'
          1*     > RETURN                                                   null

End of function getroutename

Function getrawparameters:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pAlaa
function name:  getRawParameters
number of ops:  3
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1      > RETURN                                                   'bar'
          2*     > RETURN                                                   null

End of function getrawparameters

End of class DrupalExample.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.11 ms | 996 KiB | 13 Q