Sample Test: capture_stdio_2.phpt
Back to "PHPT Test File Layout"
--TEST-- Test covering the I/O stdin and stderr streams. --DESCRIPTION-- This tests checks if the output of stdin and stderr I/O streams match the expected content. --CAPTURE_STDIO-- STDIN STDOUT --FILE-- <?php echo "Hello, world. This is sent to the stdout I/O stream\n"; fwrite(STDERR, "This is error sent to the stderr I/O stream\n"); ?> --EXPECT-- Hello, world. This is sent to the stdout I/O stream
Back to "PHPT Test File Layout"