3v4l.org

run code in 300+ PHP versions simultaneously
<?php $int = 12345; $digits = floor(log($int, 10)); echo "The 4th digit is: " . (floor($int / pow(10, 4)) % 10) . "\n"; echo "The 3rd digit is: " . (floor($int / pow(10, 3)) % 10) . "\n"; echo "The 2nd digit is: " . (floor($int / pow(10, 2)) % 10) . "\n"; echo "The 1st digit is: " . (floor($int / pow(10, 1)) % 10) . "\n"; echo "The 0th digit is: " . (floor($int / pow(10, 0)) % 10) . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
The 4th digit is: 1 The 3rd digit is: 2 The 2nd digit is: 3 The 1st digit is: 4 The 0th digit is: 5

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:
104.68 ms | 1419 KiB | 4 Q