3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NestedFunctions { public function fn1() { function nested_fn() { echo 'yay' . "\n"; } nested_fn(); } } $nested = new NestedFunctions(); $nested->fn1();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5brpq
function name:  (null)
number of ops:  6
compiled vars:  !0 = $nested
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'NestedFunctions'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_METHOD_CALL                                         !0, 'fn1'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function %00nested_fn%2Fin%2F5brpq%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5brpq
function name:  nested_fn
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'yay%0A'
          1      > RETURN                                                   null

End of function %00nested_fn%2Fin%2F5brpq%3A7%240

Class NestedFunctions:
Function fn1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5brpq
function name:  fn1
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   DECLARE_FUNCTION                                         'nested_fn'
    8     1        INIT_FCALL_BY_NAME                                       'nested_fn'
          2        DO_FCALL                                      0          
    9     3      > RETURN                                                   null

End of function fn1

End of class NestedFunctions.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.33 ms | 1393 KiB | 13 Q