3v4l.org

run code in 300+ PHP versions simultaneously
<?php $calc = function ($arg = null, $acc = '') use (&$calc) { return $arg === null ? $acc : function ($arg = null, $saved = '') use (&$calc, $acc) { return $calc($arg, $acc . $saved); }; }; $result = $calc(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/HjRLC
function name:  (null)
number of ops:  22
compiled vars:  !0 = $calc, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHjRLC%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%2FHjRLC%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 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HjRLC
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $arg, !1 = $acc, !2 = $calc
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                                                      ->11
          7    >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHjRLC%3A4%241'
          8        BIND_LEXICAL                                             ~5, !2
          9        BIND_LEXICAL                                             ~5, !1
    6    10        QM_ASSIGN                                        ~4      ~5
         11    > > RETURN                                                   ~4
    7    12*     > RETURN                                                   null

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

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.21 ms | 1392 KiB | 15 Q