xref: /php-src/ext/intl/tests/resourcebundle.inc (revision 04ab4d09)
1<?php
2// FIXME Improve Endian check when endian const gets added
3// Check if platform is Big or Little endian
4if (pack('S', 0xABCD) !== pack('v', 0xABCD)) {
5    $endian = 'be';
6} else {
7    $endian = 'le';
8}
9
10define('BUNDLE', __DIR__ . '/_files/resourcebundle_' . $endian);
11
12function debug( $res ) {
13    if (is_null( $res )) {
14        $ret = "NULL\n";
15    }
16    else {
17        $ret = print_r( $res, true ). "\n";
18    }
19    return $ret . sprintf( "%5d: %s\n", intl_get_error_code(), intl_get_error_message() );
20}
21