3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CallableStringifier { private static $callables = array(); public static function stringify(callable $callable) { $id = count(self::$callables); self::$callables[$id] = $callable; return __CLASS__ . "::call($id, func_get_args());"; } public static function call($id, $args) { return call_user_func_array(self::$callables[$id], $args); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iRAss
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E > > RETURN                                                   1

Class CallableStringifier:
Function stringify:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iRAss
function name:  stringify
number of ops:  13
compiled vars:  !0 = $callable, !1 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        FETCH_STATIC_PROP_R          unknown             ~2      'callables'
          2        COUNT                                            ~3      ~2
          3        ASSIGN                                                   !1, ~3
   10     4        FETCH_STATIC_PROP_W          unknown             $5      'callables'
          5        ASSIGN_DIM                                               $5, !1
          6        OP_DATA                                                  !0
   11     7        ROPE_INIT                                     3  ~8      '%3A%3Acall%28'
          8        ROPE_ADD                                      1  ~8      ~8, !1
          9        ROPE_END                                      2  ~7      ~8, '%2C+func_get_args%28%29%29%3B'
         10        CONCAT                                           ~10     'CallableStringifier', ~7
         11      > RETURN                                                   ~10
   12    12*     > RETURN                                                   null

End of function stringify

Function call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iRAss
function name:  call
number of ops:  10
compiled vars:  !0 = $id, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   16     2        FETCH_STATIC_PROP_R          unknown             ~2      'callables'
          3        FETCH_DIM_R                                      ~3      ~2, !0
          4        INIT_USER_CALL                                0          'call_user_func_array', ~3
          5        SEND_ARRAY                                               !1
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      0  $4      
          8      > RETURN                                                   $4
   17     9*     > RETURN                                                   null

End of function call

End of class CallableStringifier.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.58 ms | 1395 KiB | 13 Q