3v4l.org

run code in 300+ PHP versions simultaneously
<?php function g($str = null){ echo "g"; return function ($test = null){ echo "o"; }; } var_dump(g()());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hQU0K
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'g'
          2        DO_FCALL                                      0  $0      
          3        INIT_DYNAMIC_CALL                                        $0
          4        DO_FCALL                                      0  $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function g:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hQU0K
function name:  g
number of ops:  5
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
    4     1        ECHO                                                     'g'
    5     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FhQU0K%3A5%240'
    7     3      > RETURN                                                   ~1
    8     4*     > RETURN                                                   null

End of function g

Function %00%7Bclosure%7D%2Fin%2FhQU0K%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hQU0K
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      null
    6     1        ECHO                                                     'o'
    7     2      > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.89 ms | 1401 KiB | 16 Q