3v4l.org

run code in 300+ PHP versions simultaneously
<?php function g($al = null, $go = null) { $goal = function($al = null, $go = null) use (&$goal) { if (!isset($go)) $go = 'go'; else $go .= 'o'; if (!isset($al)) return function ($al) use (&$go) { return $goal($al, $go); }; return $go.$al; }; return $goal($al, $go); } echo g('al');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CiNPv
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'g'
          1        SEND_VAL                                                 'al'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function g:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CiNPv
function name:  g
number of ops:  11
compiled vars:  !0 = $al, !1 = $go, !2 = $goal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
    5     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FCiNPv%3A5%240'
          3        BIND_LEXICAL                                             ~3, !2
          4        ASSIGN                                                   !2, ~3
   11     5        INIT_DYNAMIC_CALL                                        !2
          6        SEND_VAR_EX                                              !0
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0  $5      
          9      > RETURN                                                   $5
   12    10*     > RETURN                                                   null

End of function g

Function %00%7Bclosure%7D%2Fin%2FCiNPv%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
Branch analysis from position: 15
filename:       /in/CiNPv
function name:  {closure}
number of ops:  18
compiled vars:  !0 = $al, !1 = $go, !2 = $goal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
          2        BIND_STATIC                                              !2
    7     3        ISSET_ISEMPTY_CV                                 ~3      !1
          4        BOOL_NOT                                         ~4      ~3
          5      > JMPZ                                                     ~4, ->8
          6    >   ASSIGN                                                   !1, 'go'
          7      > JMP                                                      ->9
          8    >   ASSIGN_OP                                     8          !1, 'o'
    8     9    >   ISSET_ISEMPTY_CV                                 ~7      !0
         10        BOOL_NOT                                         ~8      ~7
         11      > JMPZ                                                     ~8, ->15
         12    >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FCiNPv%3A8%241'
         13        BIND_LEXICAL                                             ~9, !1
         14      > RETURN                                                   ~9
    9    15    >   CONCAT                                           ~10     !1, !0
         16      > RETURN                                                   ~10
   10    17*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FCiNPv%3A5%240

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

End of function %00%7Bclosure%7D%2Fin%2FCiNPv%3A8%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.59 ms | 1403 KiB | 14 Q