3v4l.org

run code in 500+ PHP versions simultaneously
<?php class _DEV { private static $_className = ''; private static $_runList = array(); public function __construct() { self::$_className = get_class($this); } public function run($_what, $_code, $_params) { $_errHead = self::$_className." -> ".__FUNCTION__; $_out = array(); self::$_runList[$_what] = $_code; $_out = self::$_runList[$_what]($_params); // >>> line # 27 referred to in error message return $_out; } } $_trial = new _DEV(); $_test = function() { $_out = array(); $_out['passed'] = "Appears to be working"; return $_out; }; $_result = $_trial->run('test', $_test, ''); var_dump($_result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Zu1jO
function name:  (null)
number of ops:  15
compiled vars:  !0 = $_trial, !1 = $_test, !2 = $_result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   22     0  E >   NEW                                                  $3      '_DEV'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $3
   24     3        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
          4        ASSIGN                                                       !1, ~6
   31     5        INIT_METHOD_CALL                                             !0, 'run'
          6        SEND_VAL_EX                                                  'test'
          7        SEND_VAR_EX                                                  !1
          8        SEND_VAL_EX                                                  ''
          9        DO_FCALL                                          0  $8      
         10        ASSIGN                                                       !2, $8
   32    11        INIT_FCALL                                                   'var_dump'
         12        SEND_VAR                                                     !2
         13        DO_ICALL                                                     
         14      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Zu1jO
function name:  {closure:/in/Zu1jO:24}
number of ops:  5
compiled vars:  !0 = $_out
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   26     0  E >   ASSIGN                                                       !0, <array>
   27     1        ASSIGN_DIM                                                   !0, 'passed'
          2        OP_DATA                                                      'Appears+to+be+working'
   28     3      > RETURN                                                       !0
   29     4*     > RETURN                                                       null

End of Dynamic Function 0

Class _DEV:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Zu1jO
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   FETCH_THIS                                           ~1      
          1        GET_CLASS                                            ~2      ~1
          2        ASSIGN_STATIC_PROP                                           '_className'
          3        OP_DATA                                                      ~2
   10     4      > RETURN                                                       null

End of function __construct

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Zu1jO
function name:  run
number of ops:  19
compiled vars:  !0 = $_what, !1 = $_code, !2 = $_params, !3 = $_errHead, !4 = $_out
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
   14     3        FETCH_STATIC_PROP_R              unknown             ~5      '_className'
          4        CONCAT                                               ~6      ~5, '+-%3E+'
          5        CONCAT                                               ~7      ~6, 'run'
          6        ASSIGN                                                       !3, ~7
   15     7        ASSIGN                                                       !4, <array>
   16     8        FETCH_STATIC_PROP_W              unknown             $10     '_runList'
          9        ASSIGN_DIM                                                   $10, !0
         10        OP_DATA                                                      !1
   17    11        FETCH_STATIC_PROP_R              unknown             ~12     '_runList'
         12        FETCH_DIM_R                                          ~13     ~12, !0
         13        INIT_DYNAMIC_CALL                                            ~13
         14        SEND_VAR_EX                                                  !2
         15        DO_FCALL                                          0  $14     
         16        ASSIGN                                                       !4, $14
   18    17      > RETURN                                                       !4
   19    18*     > RETURN                                                       null

End of function run

End of class _DEV.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
128.3 ms | 484 KiB | 8 Q