mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00

"pass" is not a real encoding, it just means "don't perform any conversion". Using it as an internal encoding or passing it to any of the mbstring() function will not work (and on master commonly assert).
27 lines
520 B
PHP
27 lines
520 B
PHP
--TEST--
|
|
mb_output_handler() with output_encoding=pass
|
|
--SKIPIF--
|
|
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
|
|
--INI--
|
|
output_handler=mb_output_handler
|
|
output_encoding=pass
|
|
--FILE--
|
|
<?php
|
|
var_dump(mb_http_output());
|
|
var_dump("\xff");
|
|
ob_end_flush();
|
|
|
|
ob_start('mb_output_handler');
|
|
mb_http_output("UTF-8");
|
|
var_dump("\xff");
|
|
ob_end_flush();
|
|
|
|
ob_start('mb_output_handler');
|
|
mb_http_output("pass");
|
|
var_dump("\xff");
|
|
?>
|
|
--EXPECT--
|
|
string(4) "pass"
|
|
string(1) "ÿ"
|
|
string(1) "?"
|
|
string(1) "ÿ"
|