3v4l.org

run code in 300+ 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, '');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2hFJT
function name:  (null)
number of ops:  12
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                                  '%00%7Bclosure%7D%2Fin%2F2hFJT%3A24%240'
          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
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F2hFJT%3A24%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2hFJT
function name:  {closure}
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 function %00%7Bclosure%7D%2Fin%2F2hFJT%3A24%240

Class _DEV:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2hFJT
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/2hFJT
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.0.0


preferences:
163.36 ms | 1399 KiB | 13 Q