1: <?php
2: function scoped()
3: {
4: $func = function()
5: {
*● 6: $a = array(*
7: 1 => "first",
8: 2 => "second",
9: );
10: };
11:
12: $func();
13: }
14:
15: scoped();
16: scoped();
17: ?>
Turned off OPcache's optimiser →
function name: scoped
compiled vars: !0 = $func
line #* op operands
4 1 EXT_STMT
2 DECLARE_LAMBDA_FUNCTION '%00…closure.php0x7e…'
* 10 3 ASSIGN !0, ~1*
12 4 EXT_STMT
5 INIT_DYNAMIC_CALL !0
6 EXT_FCALL_BEGIN
7 DO_FCALL
8 EXT_FCALL_END
13 9 EXT_STMT
10 RETURN null
function name: {closure}
*compiled vars: !0 = $a*
line #* op operands
7 1 EXT_STMT
* 2 ASSIGN !0, <array>*
10 3 EXT_STMT
4 RETURN null