3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SelectUserById { private $container; public function __construct($container) { $this->container = $container; } public function vai() { echo $this->container; } } abstract class QueryFactory { public function __invoke($container) { $class = self::QUERY_NAMESPACE; return new $class($container); } } final class SelectUserByIdFactory extends QueryFactory { const QUERY_NAMESPACE = SelectUserById::class; } $instance = (new SelectUserByIdFactory)('container here'); $instance->vai();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oYm2W
function name:  (null)
number of ops:  9
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   NEW                                              $1      'SelectUserByIdFactory'
          1        DO_FCALL                                      0          
          2        INIT_DYNAMIC_CALL                                        $1
          3        SEND_VAL_EX                                              'container+here'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !0, $3
   33     6        INIT_METHOD_CALL                                         !0, 'vai'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class SelectUserById:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oYm2W
function name:  __construct
number of ops:  4
compiled vars:  !0 = $container
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'container'
          2        OP_DATA                                                  !0
   10     3      > RETURN                                                   null

End of function __construct

Function vai:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oYm2W
function name:  vai
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'container'
          1        ECHO                                                     ~0
   15     2      > RETURN                                                   null

End of function vai

End of class SelectUserById.

Class QueryFactory:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oYm2W
function name:  __invoke
number of ops:  9
compiled vars:  !0 = $container, !1 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   22     1        FETCH_CLASS_CONSTANT                             ~2      'QUERY_NAMESPACE'
          2        ASSIGN                                                   !1, ~2
   23     3        FETCH_CLASS                                   0  $4      !1
          4        NEW                                              $5      $4
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   $5
   24     8*     > RETURN                                                   null

End of function __invoke

End of class QueryFactory.

Class SelectUserByIdFactory:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oYm2W
function name:  __invoke
number of ops:  9
compiled vars:  !0 = $container, !1 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   22     1        FETCH_CLASS_CONSTANT                             ~2      'QUERY_NAMESPACE'
          2        ASSIGN                                                   !1, ~2
   23     3        FETCH_CLASS                                   0  $4      !1
          4        NEW                                              $5      $4
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   $5
   24     8*     > RETURN                                                   null

End of function __invoke

End of class SelectUserByIdFactory.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.6 ms | 1390 KiB | 13 Q