mirror of
https://github.com/php/php-src.git
synced 2024-10-16 14:02:37 +00:00
87fac43ac0
- html_translation_table and setlocale tests are no longer relevant - there are a number of ANSI-encoded files. Is this deliberate?
28 lines
671 B
PHP
28 lines
671 B
PHP
--TEST--
|
|
Bug #42861 (strtr() crashes in Unicode mode when $from argument is empty)
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump( strtr("hello", array("" => "string") ) );
|
|
var_dump( strtr("hello", array('' => "string") ) );
|
|
var_dump( strtr("hello", array(null => "string") ) );
|
|
var_dump( strtr("hello", array(NULL => "string") ) );
|
|
|
|
var_dump( strtr("hello", "", "string") );
|
|
var_dump( strtr("hello", '', "string") );
|
|
var_dump( strtr("hello", NULL, "string") );
|
|
var_dump( strtr("hello", null, "string") );
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECT--
|
|
unicode(5) "hello"
|
|
unicode(5) "hello"
|
|
unicode(5) "hello"
|
|
unicode(5) "hello"
|
|
unicode(5) "hello"
|
|
unicode(5) "hello"
|
|
unicode(5) "hello"
|
|
unicode(5) "hello"
|
|
Done
|