3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _hex2bin($hex) { $hex = strtoupper($hex); $hexLen = strlen($hex); $bin = []; for ($i = 0; $i < $hexLen; $i++) { $char = $hex[$i]; $bin[] = str_pad(base_convert($char, 16, 2), 4, '0', STR_PAD_LEFT); } return implode("", $bin); } echo _hex2bin("152F302436152F302435152F302434152F302433152F302433");
Output for git.master, git.master_jit, rfc.property-hooks
00010101001011110011000000100100001101100001010100101111001100000010010000110101000101010010111100110000001001000011010000010101001011110011000000100100001100110001010100101111001100000010010000110011

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:
59.02 ms | 401 KiB | 8 Q