3v4l.org

run code in 300+ PHP versions simultaneously
<?php function g($x=0){static$s='g';return $x?$s.$x:function($y=0){return g($y);};} // g()('al'); $x=g();echo $x('al'); /* echo g('al') , PHP_EOL; echo g()('al') , PHP_EOL; echo g()()('al') , PHP_EOL; echo g()()()('al') , PHP_EOL; */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lied1
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'g'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
          3        INIT_DYNAMIC_CALL                                        !0
          4        SEND_VAL_EX                                              'al'
          5        DO_FCALL                                      0  $3      
          6        ECHO                                                     $3
   13     7      > RETURN                                                   1

Function g:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lied1
function name:  g
number of ops:  10
compiled vars:  !0 = $x, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      0
          1        BIND_STATIC                                              !1
          2      > JMPZ                                                     !0, ->6
          3    >   CONCAT                                           ~2      !1, !0
          4        QM_ASSIGN                                        ~3      ~2
          5      > JMP                                                      ->8
          6    >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Flied1%3A2%240'
          7        QM_ASSIGN                                        ~3      ~4
          8    > > RETURN                                                   ~3
          9*     > RETURN                                                   null

End of function g

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

End of function %00%7Bclosure%7D%2Fin%2Flied1%3A2%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.66 ms | 1390 KiB | 14 Q