3v4l.org

run code in 500+ PHP versions simultaneously
<?php function uuid_to_bin($uuid){ $bin_uuid = pack("H*", str_replace('-', '', $uuid)); return $bin_uuid; } function bin_to_uuid($binid) { $arr= unpack("H*", $binid); $string = $arr['1']; $string = preg_replace("/([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})/", "$1-$2-$3-$4-$5", $string); return $string; } $uuids = [ '9c4ddfc6-6f31-486b-b07e-17cecc493a94', '00000000-0000-0000-0000-000000000000', ]; foreach ($uuids as $uuid) { var_dump($uuid === bin_to_uuid(uuid_to_bin($uuid))); }
Output for rfc.property-hooks, git.master, git.master_jit
bool(true) bool(true)

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:
44.3 ms | 1513 KiB | 4 Q