3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Predis\Command; interface CommandInterface {} abstract class AbstractCommand implements CommandInterface {} interface PrefixableCommandInterface {} abstract class PrefixableCommand extends AbstractCommand implements PrefixableCommandInterface { } class StringSet extends PrefixableCommand {} interface ConnectionInterface {} class Connection implements ConnectionInterface { public function executeCommand(CommandInterface $command) { echo 'foo connection'; } } class Tester { private $connection; public function __construct() { $this->connection = new Connection(); } public function executeCommand(CommandInterface $command) { $this->connection->executeCommand($command); } } $t = new Tester(); $t->executeCommand(new StringSet);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PMPFD
function name:  (null)
number of ops:  13
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'predis%5Ccommand%5Cabstractcommand'
   13     1        DECLARE_CLASS                                            'predis%5Ccommand%5Cprefixablecommand', 'predis%5Ccommand%5Cabstractcommand'
   16     2        DECLARE_CLASS                                            'predis%5Ccommand%5Cstringset', 'predis%5Ccommand%5Cprefixablecommand'
   22     3        DECLARE_CLASS                                            'predis%5Ccommand%5Cconnection'
   40     4        NEW                                              $1      'Predis%5CCommand%5CTester'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $1
   41     7        INIT_METHOD_CALL                                         !0, 'executeCommand'
          8        NEW                                              $4      'Predis%5CCommand%5CStringSet'
          9        DO_FCALL                                      0          
         10        SEND_VAR_NO_REF_EX                                       $4
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Class Predis\Command\CommandInterface: [no user functions]
Class Predis\Command\AbstractCommand: [no user functions]
Class Predis\Command\PrefixableCommandInterface: [no user functions]
Class Predis\Command\PrefixableCommand: [no user functions]
Class Predis\Command\StringSet: [no user functions]
Class Predis\Command\ConnectionInterface: [no user functions]
Class Predis\Command\Connection:
Function executecommand:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PMPFD
function name:  executeCommand
number of ops:  3
compiled vars:  !0 = $command
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
   25     1        ECHO                                                     'foo+connection'
   26     2      > RETURN                                                   null

End of function executecommand

End of class Predis\Command\Connection.

Class Predis\Command\Tester:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PMPFD
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   NEW                                              $1      'Predis%5CCommand%5CConnection'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'connection'
          3        OP_DATA                                                  $1
   33     4      > RETURN                                                   null

End of function __construct

Function executecommand:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PMPFD
function name:  executeCommand
number of ops:  6
compiled vars:  !0 = $command
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   RECV                                             !0      
   36     1        FETCH_OBJ_R                                      ~1      'connection'
          2        INIT_METHOD_CALL                                         ~1, 'executeCommand'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
   37     5      > RETURN                                                   null

End of function executecommand

End of class Predis\Command\Tester.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.37 ms | 1399 KiB | 13 Q