Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
「\x68\x61\061」を出力したい
$a = "\x68\x61\061"; echo $a
これは、出力で「\x68\x61\061」になりません。これを修正する方法は?
特殊文字 (この場合はバックスラッシュ) を別のバックスラッシュでエスケープします。
$a = "\\x68\\x61\\061"; echo $a;
または、代わりに一重引用符を使用してください。
$a = '\x68\x61\061'; echo $a;
参照