3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ICommand { public function execute() : string; } class Test { public function execute(string $val) : int { return 'asd ' . $val; } } $t = new Test(); echo $t->execute('sample val');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nXa7u
function name:  (null)
number of ops:  8
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'execute'
          4        SEND_VAL_EX                                              'sample+val'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

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

End of function execute

End of class ICommand.

Class Test:
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nXa7u
function name:  execute
number of ops:  6
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        CONCAT                                           ~1      'asd+', !0
          2        VERIFY_RETURN_TYPE                                       ~1
          3      > RETURN                                                   ~1
   10     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function execute

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.75 ms | 1394 KiB | 13 Q