3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 0x40; $b = ~$a; // flip bits, i.e. 2s complement so -$a and then minus 1 var_dump("var_dump: $b"); // -65 printf("\nprintf: %d\n\n", $b); var_dump( base_convert($b, 10, 2) ); // 65 // **************************// // should be: printf("\nprintf: %d\n\n", $b); printf("\nprintf:%b\n\n",-65);
Output for git.master, git.master_jit, rfc.property-hooks
string(13) "var_dump: -65" printf: -65 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /in/1IvbM on line 7 string(7) "1000001" printf: -65 printf:1111111111111111111111111111111111111111111111111111111110111111

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