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); $b[] = base_convert($hexy,16,2); $b[] = base_convert($hexd,16,2); $b[] = base_convert($hex,16,2); var_dump($b);
Output for git.master, git.master_jit, rfc.property-hooks
int(14) string(1) "e" string(1) "e" string(1) "e" int(14) Fatal error: Uncaught Error: Cannot use a scalar value as an array in /in/Em4lU:8 Stack trace: #0 {main} thrown in /in/Em4lU on line 8
Process exited with code 255.

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