php-src/tests/output/ob_end_clean_basic_001.phpt

29 lines
530 B
Plaintext
Raw Normal View History

2008-12-18 15:20:07 +00:00
--TEST--
Test return type and value, as well as basic behaviour, for ob_end_clean()
--FILE--
<?php
2018-09-16 17:16:42 +00:00
/*
2008-12-18 15:20:07 +00:00
* Function is implemented in main/output.c
2018-09-16 17:16:42 +00:00
*/
2008-12-18 15:20:07 +00:00
var_dump(ob_end_clean());
ob_start();
var_dump(ob_end_clean());
ob_start();
echo "Hello";
var_dump(ob_end_clean());
var_dump(ob_end_clean());
?>
--EXPECTF--
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in %s on line %d
2008-12-18 15:20:07 +00:00
bool(false)
bool(true)
bool(true)
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in %s on line %d
2008-12-18 15:20:07 +00:00
bool(false)