3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '回';echo urlencode($str); echo $bin = pack("C3", ord($str{0}), ord($str{1}), ord($str{2}));//回 $hex = strtoupper(bin2hex($bin)); echo "UTF-8编码: " . $hex . "\n"; $byte1 = ord($str{0}); $byte2 = ord($str{1}); $byte3 = ord($str{2}); $c1 = (($byte1 & 0x0F) << 4) | (($byte2 & 0x3F) >> 2); $c2 = (($byte2 & 0x03) << 6) | ($byte3 & 0x3F); $dec = (($c1 & 0x00FF) << 8) | $c2; echo "Unicode编码: " . $dec . "\n";

This is an error 404

There are `0` results


preferences:
148.96 ms | 1398 KiB | 7 Q