3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Leading zeroes are not significant: "; var_dump(inet_pton("2001:0010::") == inet_pton("2001:10::")); echo "2001:0010:: "; var_dump(filter_var("2001:0010::", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); echo "2001:10:: "; var_dump(filter_var("2001:10::", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); echo "\n"; echo "Testing manually: "; $inet = array_map("hexdec", array_map("bin2hex", str_split(inet_pton("2001:10::"), 2))); var_dump($inet[0] != 0x2001 || ($inet[1] & 0xFFF0) != 0x0010);
Output for git.master, git.master_jit, rfc.property-hooks
Leading zeroes are not significant: bool(true) 2001:0010:: bool(false) 2001:10:: bool(false) Testing manually: bool(false)

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