3v4l.org

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

Function g:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EKT9r
function name:  g
number of ops:  6
compiled vars:  !0 = $str, !1 = $g
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%2FEKT9r%3A5%240'
          3        ASSIGN                                                   !1, ~2
   11     4      > RETURN                                                   !1
   12     5*     > RETURN                                                   null

End of function g

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

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

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

End of function %00%7Bclosure%7D%2Fin%2FEKT9r%3A7%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.43 ms | 1399 KiB | 16 Q