mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
462da6e09c
This PR corrects misspellings identified by the check-spelling action. The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465 The action reports that the changes in this PR would make it happy: jsoref@602417c Closes GH-6822.
32 lines
566 B
PHP
32 lines
566 B
PHP
--TEST--
|
|
Bug #30578 (Output buffers flushed before calling __destruct functions)
|
|
--FILE--
|
|
<?php
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
class Example
|
|
{
|
|
function __construct()
|
|
{
|
|
ob_start();
|
|
echo "This should be displayed last.\n";
|
|
}
|
|
|
|
function __destruct()
|
|
{
|
|
$buffered_data = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
echo "This should be displayed first.\n";
|
|
echo "Buffered data: $buffered_data";
|
|
}
|
|
}
|
|
|
|
$obj = new Example;
|
|
|
|
?>
|
|
--EXPECT--
|
|
This should be displayed first.
|
|
Buffered data: This should be displayed last.
|