3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randomPassword() { $currentmonth = date('n'); $alphabet = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ"; $random = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789"; $pass = array(); $alphaLength = strlen($random) - 1; for ($i = 0; $i < 5; $i++) { $n = rand(0, $alphaLength); $pass[] = $random[$n]; } $pass[4] = substr($alphabet, $currentmonth - 1, 1); return implode($pass); } echo randomPassword();
Output for git.master
f3acl
Output for git.master_jit
Xqj2l
Output for rfc.property-hooks
xigOl

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:
74.95 ms | 407 KiB | 5 Q