Annotation of embedaddon/php/tests/lang/bug30578.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #30578 (Output buffers flushed before calling __desctruct functions) 
                      3: --FILE--
                      4: <?php
                      5: 
                      6: error_reporting(E_ALL);
                      7: 
                      8: class Example
                      9: {
                     10:     function __construct()
                     11:     {
                     12:         ob_start();
                     13:         echo "This should be displayed last.\n";
                     14:     }
                     15: 
                     16:     function __destruct()
                     17:     {
                     18:         $buffered_data = ob_get_contents();
                     19:         ob_end_clean();
                     20: 
                     21:         echo "This should be displayed first.\n";
                     22:         echo "Buffered data: $buffered_data";
                     23:     }
                     24: }
                     25: 
                     26: $obj = new Example;
                     27: 
                     28: ?>
                     29: --EXPECT--
                     30: This should be displayed first.
                     31: Buffered data: This should be displayed last.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>