mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

Little and Big endian files have their own designated folder. Both use the ASCII charset family. We may want to add a big-endian/EBCDIC charset family resource bundle in the future. The build script is currently left untouched as it seems to mostly be for Windows.
20 lines
512 B
PHP
20 lines
512 B
PHP
<?php
|
|
// FIXME Improve Endian check when endian const gets added
|
|
// Check if platform is Big or Little endian
|
|
if (pack('S', 0xABCD) !== pack('v', 0xABCD)) {
|
|
$endian = 'be';
|
|
} else {
|
|
$endian = 'le';
|
|
}
|
|
|
|
define('BUNDLE', __DIR__ . '/_files/resourcebundle_' . $endian);
|
|
|
|
function debug( $res ) {
|
|
if (is_null( $res )) {
|
|
$ret = "NULL\n";
|
|
}
|
|
else {
|
|
$ret = print_r( $res, true ). "\n";
|
|
}
|
|
return $ret . sprintf( "%5d: %s\n", intl_get_error_code(), intl_get_error_message() );
|
|
}
|