3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); trait UiHelperTrait { public function drupalGet(string $url): void { return; } } interface DrupalGetInterface { public function drupalGet(string $url): string; } class DrupalGetInterfaceTest implements DrupalGetInterface { use UiHelperTrait; } $test = new OverrideTraitMethodSignatureInChildClassTest(); var_dump($test->drupalGet('https://drupal.org'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f43o4
function name:  (null)
number of ops:  11
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   DECLARE_CLASS                                            'drupalgetinterfacetest'
   23     1        NEW                                              $1      'OverrideTraitMethodSignatureInChildClassTest'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   24     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'drupalGet'
          6        SEND_VAL_EX                                              'https%3A%2F%2Fdrupal.org'
          7        DO_FCALL                                      0  $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class UiHelperTrait:
Function drupalget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f43o4
function name:  drupalGet
number of ops:  3
compiled vars:  !0 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1      > RETURN                                                   null
    9     2*     > RETURN                                                   null

End of function drupalget

End of class UiHelperTrait.

Class DrupalGetInterface:
Function drupalget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f43o4
function name:  drupalGet
number of ops:  3
compiled vars:  !0 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        VERIFY_RETURN_TYPE                                       
          2      > RETURN                                                   null

End of function drupalget

End of class DrupalGetInterface.

Class DrupalGetInterfaceTest: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.95 ms | 997 KiB | 14 Q