3v4l.org

run code in 300+ PHP versions simultaneously
<?php $decurrying = function ($arg = null, $acc = '') use (&$decurrying) { return $arg === null ? $acc : function ($arg, $acc) use (&$decurrying) { return $decurrying($arg, $acc . $arg); }; }; $result = $decurrying(1)(3)(3)(8)(); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YZH0T
function name:  (null)
number of ops:  22
compiled vars:  !0 = $decurrying, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FYZH0T%3A3%240'
          1        BIND_LEXICAL                                             ~2, !0
          2        ASSIGN                                                   !0, ~2
    9     3        INIT_DYNAMIC_CALL                                        !0
          4        SEND_VAL_EX                                              1
          5        DO_FCALL                                      0  $4      
          6        INIT_DYNAMIC_CALL                                        $4
          7        SEND_VAL_EX                                              3
          8        DO_FCALL                                      0  $5      
          9        INIT_DYNAMIC_CALL                                        $5
         10        SEND_VAL_EX                                              3
         11        DO_FCALL                                      0  $6      
         12        INIT_DYNAMIC_CALL                                        $6
         13        SEND_VAL_EX                                              8
         14        DO_FCALL                                      0  $7      
         15        INIT_DYNAMIC_CALL                                        $7
         16        DO_FCALL                                      0  $8      
         17        ASSIGN                                                   !1, $8
   10    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FYZH0T%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YZH0T
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $arg, !1 = $acc, !2 = $decurrying
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      ''
          2        BIND_STATIC                                              !2
    4     3        TYPE_CHECK                                    2          !0
          4      > JMPZ                                                     ~3, ->7
          5    >   QM_ASSIGN                                        ~4      !1
          6      > JMP                                                      ->10
          7    >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FYZH0T%3A4%241'
          8        BIND_LEXICAL                                             ~5, !2
    6     9        QM_ASSIGN                                        ~4      ~5
         10    > > RETURN                                                   ~4
    7    11*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FYZH0T%3A3%240

Function %00%7Bclosure%7D%2Fin%2FYZH0T%3A4%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YZH0T
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $arg, !1 = $acc, !2 = $decurrying
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
    5     3        INIT_DYNAMIC_CALL                                        !2
          4        SEND_VAR_EX                                              !0
          5        CONCAT                                           ~3      !1, !0
          6        SEND_VAL_EX                                              ~3
          7        DO_FCALL                                      0  $4      
          8      > RETURN                                                   $4
    6     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FYZH0T%3A4%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.98 ms | 1400 KiB | 15 Q