php-parser/test/code/parser/stmt/function/byRef.test

59 lines
1.2 KiB
Plaintext
Raw Normal View History

2011-12-07 18:17:05 +01:00
Return and pass by ref
-----
<?php
function a(&$b) {}
function &a($b) {}
-----
array(
0: Stmt_Function(
attrGroups: array(
)
2011-12-07 18:17:05 +01:00
byRef: false
name: Identifier(
name: a
)
2011-12-07 18:17:05 +01:00
params: array(
0: Param(
attrGroups: array(
)
2020-06-07 18:52:12 +02:00
flags: 0
2011-12-07 18:17:05 +01:00
type: null
byRef: true
variadic: false
var: Expr_Variable(
2017-01-19 23:23:38 +01:00
name: b
)
default: null
2011-12-07 18:17:05 +01:00
)
)
returnType: null
2011-12-07 18:17:05 +01:00
stmts: array(
)
)
1: Stmt_Function(
attrGroups: array(
)
2011-12-07 18:17:05 +01:00
byRef: true
name: Identifier(
name: a
)
2011-12-07 18:17:05 +01:00
params: array(
0: Param(
attrGroups: array(
)
2020-06-07 18:52:12 +02:00
flags: 0
2011-12-07 18:17:05 +01:00
type: null
byRef: false
variadic: false
var: Expr_Variable(
2017-01-19 23:23:38 +01:00
name: b
)
default: null
2011-12-07 18:17:05 +01:00
)
)
returnType: null
2011-12-07 18:17:05 +01:00
stmts: array(
)
)
2017-01-19 22:25:22 +01:00
)