3v4l.org

run code in 300+ PHP versions simultaneously
<?php test(); function test(){ echo "Test works\r\n"; } //output: Test works $closure = function(){ closure_test(); function closure_test(){ echo "Closure test works\r\n"; } }; $closure();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YpRV9
function name:  (null)
number of ops:  7
compiled vars:  !0 = $closure
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'test'
          1        DO_FCALL                                      0          
   11     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FYpRV9%3A11%240'
          3        ASSIGN                                                   !0, ~2
   18     4        INIT_DYNAMIC_CALL                                        !0
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YpRV9
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'Test+works%0D%0A'
    7     1      > RETURN                                                   null

End of function test

Function %00%7Bclosure%7D%2Fin%2FYpRV9%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YpRV9
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL_BY_NAME                                       'closure_test'
          1        DO_FCALL                                      0          
   14     2        DECLARE_FUNCTION                                         'closure_test'
   17     3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FYpRV9%3A11%240

Function %00closure_test%2Fin%2FYpRV9%3A14%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YpRV9
function name:  closure_test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'Closure+test+works%0D%0A'
   16     1      > RETURN                                                   null

End of function %00closure_test%2Fin%2FYpRV9%3A14%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.09 ms | 1394 KiB | 13 Q