mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-18 18:08:54 +00:00
![]() var_export stopped using output buffering to convert output to a string long before php 7.0. See https://github.com/php/php-src/blob/PHP-7.0/ext/standard/var.c#L564-L582 highlight_string/highlight_file are still using output buffering. ``` <?php function my_buffer($value) { fprintf(STDERR, "var_export output: %s\n", var_export(array(), true)); fprintf(STDERR, "print_r output: %s\n", print_r(array(), true)); //fprintf(STDERR, "highlight_string output: %s\n", highlight_string('2+2', true)); return $value; } ob_start('my_buffer'); echo "test"; $result = ob_get_clean(); echo "Result: $result\n"; ``` Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de> Closes GH-381. |
||
---|---|---|
.. | ||
functions | ||
book.xml | ||
constants.xml | ||
ini.xml | ||
reference.xml | ||
setup.xml | ||
versions.xml |