3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = ""; $strings = [ "a", "\u{FFDA}", "\u{FDFA}", "", "aa", "\xF5", ]; foreach ($strings as $string) { $decomposition = Normalizer::getRawDecomposition($string); // $decomposition = normalizer_get_raw_decomposition($string); Procedural way $error_code = intl_get_error_code(); $error_message = intl_get_error_message(); $string_hex = bin2hex($string); $result .= "---------------------\n"; if ($decomposition === null) { $result .= "'$string_hex' has no decomposition mapping\n" ; } else { $result .= "'$string_hex' has the decomposition mapping '" . bin2hex($decomposition) . "'\n" ; } $result .= "error info: '$error_message' ($error_code)\n"; } echo $result;
Output for git.master, git.master_jit, rfc.property-hooks
--------------------- '61' has no decomposition mapping error info: 'U_ZERO_ERROR' (0) --------------------- 'efbf9a' has no decomposition mapping error info: 'U_ZERO_ERROR' (0) --------------------- 'efb7ba' has no decomposition mapping error info: 'U_ZERO_ERROR' (0) --------------------- '' has no decomposition mapping error info: 'Input string must be exactly one UTF-8 encoded code point long.: U_ILLEGAL_ARGUMENT_ERROR' (1) --------------------- '6161' has no decomposition mapping error info: 'Input string must be exactly one UTF-8 encoded code point long.: U_ILLEGAL_ARGUMENT_ERROR' (1) --------------------- 'f5' has no decomposition mapping error info: 'Code point out of range: U_ILLEGAL_ARGUMENT_ERROR' (1)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
163.2 ms | 407 KiB | 5 Q