3v4l.org

run code in 300+ PHP versions simultaneously
<?php class name1Controller{ function __construct() { echo "new name1!\n"; } } class name2Controller{ function __construct() { echo "new name2!\n"; } } class SuperAdminController { function Action($controller, $wanted = '') { $c = "{$controller}Controller"; $o = new $c(); } } $s = new SuperAdminController(); $s->Action('name1');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FdP55
function name:  (null)
number of ops:  7
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'SuperAdminController'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'Action'
          4        SEND_VAL_EX                                              'name1'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class name1Controller:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FdP55
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'new+name1%21%0A'
    7     1      > RETURN                                                   null

End of function __construct

End of class name1Controller.

Class name2Controller:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FdP55
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'new+name2%21%0A'
   13     1      > RETURN                                                   null

End of function __construct

End of class name2Controller.

Class SuperAdminController:
Function action:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FdP55
function name:  Action
number of ops:  10
compiled vars:  !0 = $controller, !1 = $wanted, !2 = $c, !3 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      ''
   18     2        NOP                                                      
          3        FAST_CONCAT                                      ~4      !0, 'Controller'
          4        ASSIGN                                                   !2, ~4
   19     5        FETCH_CLASS                                   0  $6      !2
          6        NEW                                              $7      $6
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !3, $7
   20     9      > RETURN                                                   null

End of function action

End of class SuperAdminController.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.99 ms | 1399 KiB | 13 Q