-
-
Notifications
You must be signed in to change notification settings - Fork 467
/
concat.zep
77 lines (63 loc) · 1.34 KB
/
concat.zep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
namespace Stub;
class Concat
{
protected static testProperty = null;
static public function getTestProperty() -> string | null
{
return self::testProperty;
}
static public function testConcatBySelfProperty(string title) -> void
{
let self::testProperty .= title;
}
public function testConcat1() -> string
{
var url;
let url = "test";
let url = "append" . url;
return url;
}
public function testConcat2() -> string
{
var url;
let url = "test";
let url = "append" . url . "other";
let url = "append" . "other";
let url = "append" . "other" . url;
return url;
}
/**
* @link https://github.com/zephir-lang/zephir/issues/1573
*/
public function testConcat3() -> string
{
var a, b;
let a = "1";
let b = "2";
let b .= a;
return b;
}
/**
* @link https://github.com/zephir-lang/zephir/issues/1893
*/
public function testConcat4(var value) -> string
{
var min, max;
string query = "";
let min = value / 100 * 25,
max = value / 100 * 50;
let query .= "SELECT * FROM TEST WHERE value <= " . max,
query .= " AND value >= " . min;
return query;
}
/**
* @link https://github.com/zephir-lang/zephir/issues/1893
*/
public function testConcat5(double number) -> string
{
string retval;
string left = "Concatenated string with number ";
let retval = left . number;
return retval;
}
}