3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 43951789; $u = -43951789; $c = 65; // ASCII 65 is 'A' // notice the double %%, this prints a literal '%' character printf("%%b = '%b'\n", $n); // binary representation printf("%%c = '%c'\n", $c); // print the ascii character, same as chr() function printf("%%d = '%d'\n", $n); // standard integer representation printf("%%e = '%e'\n", $n); // scientific notation printf("%%u = '%u'\n", $n); // unsigned integer representation of a positive integer printf("%%u = '%u'\n", $u); // unsigned integer representation of a negative integer printf("%%f = '%f'\n", $n); // floating point representation printf("%%o = '%o'\n", $n); // octal representation printf("%%s = '%s'\n", $n); // string representation printf("%%x = '%x'\n", $n); // hexadecimal representation (lower-case) printf("%%X = '%X'\n", $n); // hexadecimal representation (upper-case) printf("%%+d = '%+d'\n", $n); // sign specifier on a positive integer printf("%%+d = '%+d'\n", $u); // sign specifier on a negative integer
Output for git.master, git.master_jit, rfc.property-hooks
%b = '10100111101010011010101101' %c = 'A' %d = '43951789' %e = '4.395179e+7' %u = '43951789' %u = '18446744073665599827' %f = '43951789.000000' %o = '247523255' %s = '43951789' %x = '29ea6ad' %X = '29EA6AD' %+d = '+43951789' %+d = '-43951789'

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:
52.75 ms | 402 KiB | 8 Q