php闭包中使用use声明变量的作用域实例分析
php  /  管理员 发布于 7年前   190
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename: /tmp/testclosure.php
function name: (null)
number of ops: 20
compiled vars: !0 = $c, !1 = $i, !2 = $c2
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
2 0 E > NOP
11 1 SEND_VAL 123
2 DO_FCALL 1 $0 'getclosure'
3 ASSIGN !0, $0
12 4 ASSIGN !1, 456
13 5 INIT_FCALL_BY_NAME !0
6 SEND_VAL 'test'
7 DO_FCALL_BY_NAME 1
14 8 SEND_VAL 3
9 DO_FCALL 1 'sleep'
15 10 SEND_VAL 123
11 DO_FCALL 1 $5 'getclosure'
12 ASSIGN !2, $5
16 13 INIT_FCALL_BY_NAME !2
14 SEND_VAL 'test'
15 DO_FCALL_BY_NAME 1
17 16 INIT_FCALL_BY_NAME !0
17 SEND_VAL 'test'
18 DO_FCALL_BY_NAME 1
29 19 > RETURN 1
Function %00%7Bclosure%7D%2Ftmp%2Ftestclosure.php0x7fb0115f505:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename: /tmp/testclosure.php
function name: {closure}
number of ops: 12
compiled vars: !0 = $param, !1 = $i
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
5 0 E > RECV !0
1 FETCH_R static $0 'i'
2 ASSIGN !1, $0
6 3 ADD_STRING ~2 '---+param%3A+'
4 ADD_VAR ~2 ~2, !0
5 ADD_STRING ~2 ~2, '+---%0A'
6 ECHO ~2
7 7 ADD_STRING ~3 '---+i%3A+'
8 ADD_VAR ~3 ~3, !1
9 ADD_STRING ~3 ~3, '+---%0A'
10 ECHO ~3
8 11 > RETURN null
End of function %00%7Bclosure%7D%2Ftmp%2Ftestclosure.php0x7fb0115f505
Function getclosure:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename: /tmp/testclosure.php
function name: getClosure
number of ops: 9
compiled vars: !0 = $i
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
2 0 E > RECV !0
4 1 CONCAT ~0 !0, '-'
2 SEND_VAL 'H%3Ai%3As'
3 DO_FCALL 1 $1 'date'
4 CONCAT ~2 ~0, $1
5 ASSIGN !0, ~2
5 6 DECLARE_LAMBDA_FUNCTION '%00%7Bclosure%7D%2Ftmp%2Ftestclosure.php0x7fb0115f5051'
8 7 > RETURN ~4
9 8* > RETURN null
End of function getclosure
122 在
学历:一种延缓就业设计,生活需求下的权衡之选中评论 工作几年后,报名考研了,到现在还没认真学习备考,迷茫中。作为一名北漂互联网打工人..123 在
Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..原梓番博客 在
在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..博主 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..1111 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号