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
+ opcache.optimization_level = 0x7FFEBFFF & ~0x400
5
+ --FILE--
6
+ <?php
7
+ $ counter = 0 ;
8
+ ob_start (function ($ buffer ) use (&$ c , &$ counter ) {
9
+ $ c = 0 ;
10
+ ++$ counter ;
11
+ }, 1 );
12
+ $ c .= [];
13
+ $ c .= [];
14
+ ob_end_clean ();
15
+ echo $ counter . "\n" ;
16
+ ?>
17
+ --EXPECT--
18
+ 3
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #79836 (Segfault in concat_function)
3
+ --INI--
4
+ opcache.optimization_level = 0x7FFEBFFF & ~0x400
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
+ --FILE--
4
+ <?php
5
+ $ c = str_repeat ("abcd " , 10 );
6
+
7
+ ob_start (function () use (&$ c ) {
8
+ $ c = 0 ;
9
+ }, 1 );
10
+
11
+ class X {
12
+ function __toString () {
13
+ echo "a " ;
14
+ return "abc " ;
15
+ }
16
+ }
17
+
18
+ $ xxx = new X ;
19
+
20
+ $ x = $ c . $ xxx ;
21
+ ob_end_clean ();
22
+ echo $ x . "\n" ;
23
+ ?>
24
+ --EXPECT--
25
+ abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabc
You can’t perform that action at this time.
0 commit comments