3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generate_alpha_num_id($x){ return 0+$x; // add zero to convert strings to integers (effectively trimming leading zeros) } echo generate_alpha_num_id(010100001); // send parameter as 2129921 base 8 (octal) echo "\n---\n"; echo generate_alpha_num_id('010100001'); // send parameter as string to avoid octal interpretation
Output for git.master, git.master_jit, rfc.property-hooks
2129921 --- 10100001

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:
167.76 ms | 405 KiB | 5 Q