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) /* {
334334}
335335/* }}} */
336336
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+
337347/* {{{ sapi_module_struct phpdbg_sapi_module
338348 */
339349static sapi_module_struct phpdbg_sapi_module = {
@@ -346,8 +356,8 @@ static sapi_module_struct phpdbg_sapi_module = {
346356 NULL , /* activate */
347357 php_sapi_phpdbg_deactivate , /* deactivate */
348358
349- NULL , /* unbuffered write */
350- NULL , /* flush */
359+ php_sapi_phpdbg_ub_write , /* unbuffered write */
360+ php_sapi_phpdbg_flush , /* flush */
351361 NULL , /* get uid */
352362 NULL , /* getenv */
353363
Original file line number Diff line number Diff line change @@ -477,8 +477,10 @@ static PHPDBG_COMMAND(run) /* {{{ */
477477 & PHPDBG_G (seek ));
478478
479479 zend_try {
480+ php_output_activate (TSRMLS_C );
480481 zend_execute (
481482 EG (active_op_array ) TSRMLS_CC );
483+ php_output_deactivate (TSRMLS_C );
482484 } zend_catch {
483485 EG (active_op_array ) = orig_op_array ;
484486 EG (opline_ptr ) = orig_opline ;
Original file line number Diff line number Diff line change @@ -38,4 +38,11 @@ function test() {
3838
3939if (isset ($ dump ))
4040 var_dump ($ _SERVER );
41+
42+ echo 'Start ' ;
43+ ob_start ();
44+ echo 'Hello ' ;
45+ $ b = ob_get_clean ();
46+ echo 'End ' ;
47+ echo $ b ;
4148?>
You can’t perform that action at this time.
0 commit comments