File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,16 @@ static void php_sapi_phpdbg_register_vars(zval *track_vars_array TSRMLS_DC) /* {
334
334
}
335
335
/* }}} */
336
336
337
+ static inline int php_sapi_phpdbg_ub_write (const char * message , unsigned int length TSRMLS_DC ) /* {{{ */
338
+ {
339
+ return phpdbg_write (message );
340
+ } /* }}} */
341
+
342
+ static inline void php_sapi_phpdbg_flush (void * context ) /* {{{ */
343
+ {
344
+ fflush (stdout );
345
+ } /* }}} */
346
+
337
347
/* {{{ sapi_module_struct phpdbg_sapi_module
338
348
*/
339
349
static sapi_module_struct phpdbg_sapi_module = {
@@ -346,8 +356,8 @@ static sapi_module_struct phpdbg_sapi_module = {
346
356
NULL , /* activate */
347
357
php_sapi_phpdbg_deactivate , /* deactivate */
348
358
349
- NULL , /* unbuffered write */
350
- NULL , /* flush */
359
+ php_sapi_phpdbg_ub_write , /* unbuffered write */
360
+ php_sapi_phpdbg_flush , /* flush */
351
361
NULL , /* get uid */
352
362
NULL , /* getenv */
353
363
Original file line number Diff line number Diff line change @@ -477,8 +477,10 @@ static PHPDBG_COMMAND(run) /* {{{ */
477
477
& PHPDBG_G (seek ));
478
478
479
479
zend_try {
480
+ php_output_activate (TSRMLS_C );
480
481
zend_execute (
481
482
EG (active_op_array ) TSRMLS_CC );
483
+ php_output_deactivate (TSRMLS_C );
482
484
} zend_catch {
483
485
EG (active_op_array ) = orig_op_array ;
484
486
EG (opline_ptr ) = orig_opline ;
Original file line number Diff line number Diff line change @@ -38,4 +38,11 @@ function test() {
38
38
39
39
if (isset ($ dump ))
40
40
var_dump ($ _SERVER );
41
+
42
+ echo 'Start ' ;
43
+ ob_start ();
44
+ echo 'Hello ' ;
45
+ $ b = ob_get_clean ();
46
+ echo 'End ' ;
47
+ echo $ b ;
41
48
?>
You can’t perform that action at this time.
0 commit comments