This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstring> | |
#include <string_view> | |
void mb_trim(size_t *strlen, char **str, const size_t | |
trim_lengths_num, const size_t *trim_lengths, const char **trim_chars) | |
{ | |
size_t local_strlen = *strlen; | |
char *local_str = *str; | |
for (;;) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--TEST-- | |
GH-11587 Fixed the condition for result set values to be of native type, making it compatible with previous versions. #11616 | |
--EXTENSIONS-- | |
pdo_mysql | |
--SKIPIF-- | |
<?php | |
if (!extension_loaded('mysqli') && !extension_loaded('mysqlnd')) { | |
/* Need connection to detect library version */ | |
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); | |
MySQLPDOTest::skip(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$pdo = new PDO("mysql:host=127.0.0.1;dbname=ore", "root", "password"); | |
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); | |
$pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); | |
$results = $pdo->query("SELECT * FROM test"); | |
foreach ($results as $result) { | |
var_dump($result); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UTF-8 encoded sample plain-text file | |
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | |
Markus Kuhn [ˈmaʳkʊs kuːn] <http://www.cl.cam.ac.uk/~mgk25/> — 2002-07-25 CC BY | |
The ASCII compatible UTF-8 encoding used in this plain-text file | |
is defined in Unicode, ISO 10646-1, and RFC 2279. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--TEST-- | |
mb_check_encoding() marked as valid UTF-8 when valid UTF-8 strings | |
--EXTENSIONS-- | |
mbstring | |
zend_test | |
--SKIPIF-- | |
<?php | |
if (function_exists('zend_test_is_string_marked_as_valid_utf8') !== true) { | |
exit("zend_test extension is not included, skip this test"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (empty($argv[1])) { | |
$php = "~/php80/bin/php"; | |
} else { | |
$php = $argv[1]; | |
} | |
exec($php . " -n -c tmp-php.ini run-tests.php -n -c tmp-php.ini -d extension_dir=./modules ext/mbstring/ -w failed.txt"); | |
$failed = file_get_contents("failed.txt"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--TEST-- | |
Check that strings are marked as not valid UTF-8 (ISO-2022-JP) | |
--EXTENSIONS-- | |
zend_test | |
--FILE-- | |
<?php | |
echo "ISO-2022-JP String:\n"; | |
$a = "a"; | |
$esc1 = "\x1b"; | |
$esc2 = "\x24"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
php -v | |
sapi/cli/php -v | |
for VAL in `cat diffs.txt` | |
do | |
echo ${VAL} | |
php -r "var_dump(mb_convert_encoding(hex2bin('${VAL}'), 'UTF-8', 'MacJapanese'));" | |
sapi/cli/php -r "var_dump(mb_convert_encoding(hex2bin('${VAL}'), 'UTF-8', 'MacJapanese'));" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- ー | |
~ 〜 | |
. 。 | |
, 、 | |
;/ ・ | |
;. … | |
;, ‥ | |
;h ← | |
;j ↓ | |
;k ↑ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": true | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
NewerOlder