Table of Contents Previous Next
Logo
Client-Side Slice-to-PHP Mapping : 28.6 Mapping for Simple Built‑In Types
Copyright © 2003-2010 ZeroC, Inc.

28.6 Mapping for Simple Built‑In Types

PHP has a limited set of primitive types: boolean, integer, double, and string. The Slice built‑in types are mapped to PHP types as shown in Table 28.1.
Table 28.1. Mapping of Slice built‑in types to PHP.
true or false
PHP’s integer type may not accommodate the range of values supported by Slice’s long type, therefore long values that are outside this range are mapped as strings. Scripts must be prepared to receive an integer or string from any operation that returns a long value.

28.6.1 String Mapping

String values returned as the result of a Slice operation (including return values, out parameters, and data members) contain UTF-8 encoded strings unless the program has installed a string converter, in which case string values use the converter’s native encoding instead. See Section 32.24 for more information on string converters.
As string input values for a remote Slice operation, Ice accepts null in addi­tion to string objects; each occurrence of null is marshaled as an empty string. Ice assumes that all string objects contain valid UTF-8 encoded strings unless the program has installed a string converter, in which case Ice assumes that string objects use the native encoding expected by the converter.

Table of Contents Previous Next
Logo