1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-11 08:59:46 +01:00
PHP-Parser/test/code/parser/expr/cast.test

94 lines
1.7 KiB
Plaintext
Raw Normal View History

2011-11-27 11:20:35 +01:00
Casts
-----
<?php
(array) $a;
(bool) $a;
(boolean) $a;
(real) $a;
(double) $a;
(float) $a;
(int) $a;
(integer) $a;
(object) $a;
(string) $a;
(unset) $a;
-----
array(
2017-01-19 22:25:22 +01:00
0: Stmt_Expression(
expr: Expr_Cast_Array(
expr: Expr_Variable(
name: a
)
2011-11-27 11:20:35 +01:00
)
)
2017-01-19 22:25:22 +01:00
1: Stmt_Expression(
expr: Expr_Cast_Bool(
expr: Expr_Variable(
name: a
)
2011-11-27 11:20:35 +01:00
)
)
2017-01-19 22:25:22 +01:00
2: Stmt_Expression(
expr: Expr_Cast_Bool(
expr: Expr_Variable(
name: a
)
2011-11-27 11:20:35 +01:00
)
)
2017-01-19 22:25:22 +01:00
3: Stmt_Expression(
expr: Expr_Cast_Double(
expr: Expr_Variable(
name: a
)
2011-11-27 11:20:35 +01:00
)
)
2017-01-19 22:25:22 +01:00
4: Stmt_Expression(
expr: Expr_Cast_Double(
expr: Expr_Variable(
name: a
)
2011-11-27 11:20:35 +01:00
)
)
2017-01-19 22:25:22 +01:00
5: Stmt_Expression(
expr: Expr_Cast_Double(
expr: Expr_Variable(
name: a
)
2011-11-27 11:20:35 +01:00
)
)
2017-01-19 22:25:22 +01:00
6: Stmt_Expression(
expr: Expr_Cast_Int(
expr: Expr_Variable(
name: a
)
2011-11-27 11:20:35 +01:00
)
)
2017-01-19 22:25:22 +01:00
7: Stmt_Expression(
expr: Expr_Cast_Int(
expr: Expr_Variable(
name: a
)
2011-11-27 11:20:35 +01:00
)
)
2017-01-19 22:25:22 +01:00
8: Stmt_Expression(
expr: Expr_Cast_Object(
expr: Expr_Variable(
name: a
)
2011-11-27 11:20:35 +01:00
)
)
2017-01-19 22:25:22 +01:00
9: Stmt_Expression(
expr: Expr_Cast_String(
expr: Expr_Variable(
name: a
)
2011-11-27 11:20:35 +01:00
)
)
2017-01-19 22:25:22 +01:00
10: Stmt_Expression(
expr: Expr_Cast_Unset(
expr: Expr_Variable(
name: a
)
2011-11-27 11:20:35 +01:00
)
)
)