3v4l.org

run code in 300+ PHP versions simultaneously
<?php $b = 0b1110; // binary number evaluates as 14 dec and that value assigned to $b var_dump($b);// 14 $hexy = base_convert("0b1110",2, 16);// intepret numeric string as binary number to convert to hex $hexd = base_convert( 1110, 2, 16); // literal binary needs to be w/o "0b" prefix or messes up! $hex = base_convert($b, 10, 16); // or convert 14 dec to hex var_dump($hexy,$hexd, $hex,$b); $r[0] = base_convert($hexy,16,2); $r[1] = base_convert($hexd,16,2); $r[2] = base_convert($hex,16,2); var_dump($r);
Output for git.master, git.master_jit, rfc.property-hooks
int(14) string(1) "e" string(1) "e" string(1) "e" int(14) array(3) { [0]=> string(4) "1110" [1]=> string(4) "1110" [2]=> string(4) "1110" }

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