File tree Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #79836 (Segfault in concat_function)
3
+ --INI--
4
+ error_reporting = E_ALL & ~E_WARNING
5
+ --FILE--
6
+ <?php
7
+ ob_start (function () use (&$ c ) {
8
+ $ c = 0 ;
9
+ }, 1 );
10
+ $ c .= [];
11
+ $ c .= [];
12
+ ob_end_clean ();
13
+ echo "Done \n" ;
14
+ ?>
15
+ --EXPECT--
16
+ Done
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #79836 (Segfault in concat_function)
3
+ --INI--
4
+ error_reporting = E_ALL & ~E_WARNING
5
+ --FILE--
6
+ <?php
7
+ $ x = 'non-empty ' ;
8
+ ob_start (function () use (&$ c ) {
9
+ $ c = 0 ;
10
+ }, 1 );
11
+ $ c = [];
12
+ $ x = $ c . $ x ;
13
+ $ x = $ c . $ x ;
14
+ ob_end_clean ();
15
+ echo "Done \n" ;
16
+ ?>
17
+ --EXPECT--
18
+ Done
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #79836 (Segfault in concat_function)
3
+ --INI--
4
+ error_reporting = E_ALL & ~E_WARNING
5
+ --FILE--
6
+ <?php
7
+ $ c = str_repeat ("abcd " , 10 );
8
+
9
+ ob_start (function () use (&$ c ) {
10
+ $ c = 0 ;
11
+ }, 1 );
12
+
13
+ class X {
14
+ function __toString () {
15
+ echo "a " ;
16
+ return "abc " ;
17
+ }
18
+ }
19
+
20
+ $ xxx = new X ;
21
+
22
+ $ x = $ c . $ xxx ;
23
+ ob_end_clean ();
24
+ echo $ x . "\n" ;
25
+ ?>
26
+ --EXPECT--
27
+ abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabc
You can’t perform that action at this time.
0 commit comments