Skip to content

Commit ea121a2

Browse files
committed
Add an additional test for concat_function for non-interned strings
This tests for the case where result == op1, op1 != op2 and op1_string and op2_string are non-interned strings that are equal.
1 parent 5a021c9 commit ea121a2

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
Test concatenating a class instance that has __toString with itself that uses a non-interned string
3+
--FILE--
4+
<?php
5+
$global_non_interned_string = str_repeat("a", 3);
6+
7+
class Test {
8+
public function __toString() {
9+
global $global_non_interned_string;
10+
return $global_non_interned_string;
11+
}
12+
}
13+
14+
$test1 = new Test;
15+
$test2 = new Test;
16+
$test1 .= $test2;
17+
18+
echo $test1 . "\n";
19+
?>
20+
--EXPECT--
21+
aaaaaa

0 commit comments

Comments
 (0)