1
0
mirror of https://github.com/php/php-src.git synced 2026-04-16 20:41:18 +02:00
Files
archived-php-src/tests/output/ob_get_length_basic_001.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

38 lines
615 B
PHP

--TEST--
Test return type and value, as well as basic behaviour, of ob_get_length()
--FILE--
<?php
/*
* proto int ob_get_length(void)
* Function is implemented in main/output.c
*/
echo "No output buffers\n";
var_dump(ob_get_length());
ob_start();
var_dump(ob_get_length());
echo "hello\n";
var_dump(ob_get_length());
ob_flush();
$value = ob_get_length();
echo "hello\n";
ob_clean();
var_dump(ob_get_length());
var_dump($value);
ob_end_flush();
echo "No output buffers\n";
var_dump(ob_get_length());
?>
--EXPECT--
No output buffers
bool(false)
int(0)
hello
int(13)
int(0)
int(0)
No output buffers
bool(false)