3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Crap { private $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; public function generateSalt($len = 32) { $salt = ""; for ($i = 0; $i < $len; $i++) { $index = rand(0, (strlen($this->chars) - 1)); $salt .= $this->chars[$index]; } return $salt; } } $crap = new Crap(); echo $crap->generateSalt();
Output for 7.1.0
yu1ghARUc7qpYteO723NETY4Eqaqlsih
Output for 7.0.14
g0tNZ2Ypgi1K9QiTbCBeO0w4MCY46rBc
Output for 7.0.6
ehcYmwrWBqUdtk87muYGZJkIyKcR3re8
Output for 7.0.5
jrELTk9hqvLfH6PxHQJ0PkLRBM8MUnd5
Output for 7.0.4
saW0ipWmXyAK4uuHEOJX8TPjHqdzulCN
Output for 7.0.3
gWLPqPPsQxHnUYP5j5oiaqzNfUNXec9k
Output for 7.0.2
5aDlA8ydXkaXDDU8FmpQf1lFXNC1fLpa
Output for 7.0.1
BovmxJs4Gcwi0NG7gFUofMagZoRebmQC
Output for 7.0.0
jce2FJ1lerUZpGVvlDdoOMxlVEofqQUz
Output for hhvm-3.12.0
CrJyGbe35OEqttzBF66pScxBAHL5Ygtq
Output for hhvm-3.10.0
eBj4PNbDfbjpHAmO49uUnZME9yjijwZn
Output for 5.6.28
BmWeC8a7H2wYMohfuX2ius92gFiXXO1p
Output for 5.6.21
X2LLJd7oVAXTNFVyzb4l3cX8745loRJb
Output for 5.6.20
mdZjEHvn0dSUbtDwZLTAKkOZitDdjdWw
Output for 5.6.19
04qcNPzlF8Pg8gd78yBbaCzI8RkCkdKk
Output for 5.6.18
brPTJVjkSEtkFnKHwq3tmOBfn5OMYAQZ
Output for 5.6.17
hdXiqqL3COpqzixNqcyAhS9bJOSum7Qu
Output for 5.6.16
CWPu7wKLOpALEEgvm35kRvNJdPGw9cpB
Output for 5.6.15
QNk1zBLLFcN219F1XBunwZSsRradGnLm
Output for 5.6.14
25yFCEKQ8kkJN9rsUXyj6nIhwf6IG2Gy
Output for 5.6.13
nSWGoa0qom4AqIrfysV1VBsC93i90oen
Output for 5.6.12
ZpMy66fhEkL86RE41qVVifhcZLHDPNEE
Output for 5.6.11
4WmSjDiuh5qZOPSqaTR1QJtXSd5YNING
Output for 5.6.10
ldNUEYVrkhj72XHX0pnwSi7GwOYfIDtU
Output for 5.6.9
N4zS8qzhpwAr499xTKZ7TGp7IuoTFHmj
Output for 5.6.8
jexb953MYEZvbcBdBNUUJiwJH4l13KCb
Output for 5.5.35
mNnY0BU39DnmqFHrATqmReGznifWnzJA
Output for 5.5.34
wBLrOzVMnEcYxzjUhMMteJIFgV9Q356p
Output for 5.5.33
T3j6owcx0CZpZGAyHDZCDAi14CJlFuwo
Output for 5.5.32
mqLIH1uOPYmbEvowgqCJHl6usLkWtaOF
Output for 5.5.31
bXsXsB8yInB2Wb8MHF6F5syhKswxx1qz
Output for 5.5.30
sXD2kF7mzMeh6Buh1Q7qJP9scDxgq8MI
Output for 5.5.29
yR9iHEcHzHlaCQV1c4xNdCp9neBbqbeO
Output for 5.5.28
qZo886X4LsDjrI2QIieIq38m8F8cXzQe
Output for 5.5.27
5Q7VHFvgo4ri3IyYNdzH83UCYemF5ZCZ
Output for 5.5.26
NYWE4riis0ukr4IENgEhejmUf3iltqg8
Output for 5.5.25
iNv1wtQy6pHen9IrmbMVbMJrfCcYWvb5
Output for 5.5.24
yvU6UZRNbVEHRUxIxho8w8V73F2rbUfA
Output for 5.4.45
LUallnIoGA65UIkMNi1LV4aGEs0vsGM4
Output for 5.4.44
lkKuwG2HqDGhd1YNfXdk1P64ehDgpoAB
Output for 5.4.43
2RJHVat0WHWsbDhqxqtA6JUgGPNwxNXo
Output for 5.4.42
HgJSExrFiE5PR1iVZefgGoWGqfoVKBfh
Output for 5.4.41
00xLRdBP2LkFJ7yPcUgUKtJylgzYO2WO
Output for 5.4.40
hiVhmGwg0BsyjHDw7miox6l8J86C4pHb
Output for 5.4.39
fk4uGt2b83AKAVnWVgGcO3kPyFlKmGmr
Output for 5.4.38
9VCfrJBXmKAjOt11TIVytkLzdoRYkcwj
Output for 5.4.37
3mORmbPK07mtmzkY4wbCku7kHZrVFBBy
Output for 5.4.36
FSIaOCk6NBczXZQbUIo300wEeaYopPLV
Output for 5.4.35
R7PkeQNiIBbIhgp7zlqHcyC3dfooocz7
Output for 5.4.34
9SSdC9PozEAJ4PD1Kx3QHL5jB6UYsazr
Output for 5.4.32
3yHgFCqDRl98mdLa08D3dTIYLxfqbra5
Output for 5.4.31
gp0F1ZkM54RRV7Pmb5viP1S09ySkgOMn
Output for 5.4.30
bmel8oxnmvqWrja5eRO0tZ8JCFlVCmgE
Output for 5.4.29
qVEe4PuFXJM3oraYbSmZv8QogZSQzw8P
Output for 5.4.28
K5RHvc59luyLKYRwiTNA8ZeMybPakgZV
Output for 5.4.27
REOkGOIQJO7VN1N53WB0OGj8qfvEDpnl
Output for 5.4.26
FEwg7HjJyz7fJGyfogvThP1QbxX4kfBQ
Output for 5.4.25
v2w0xVQkHzHBonBMRKhW09rDNEwDKFx7
Output for 5.4.24
sQs2zyzKG8oWxb25ROFxkgKuGD4R8B0q
Output for 5.4.23
vzSDxhDK6sfWqmehrWXMehLQurGdAFEW
Output for 5.4.22
nYMuUMGPNOAcHdsi03v2C3klVqFi8phk
Output for 5.4.21
qzISZTvJZ1Vw1BMw5oqtGvaRJ38XYwUe
Output for 5.4.20
PSkpR37P9sHQzUZwz0bXygEIgKdnr747
Output for 5.4.19
mNR2Rt8Ln9lzLhplmMeya4fFcSMujHVv
Output for 5.4.18
l71ewntN7ZxsY4ai69b4DgcYqjJ495Pk
Output for 5.4.17
HOB6sFFiRjMuBA1zJyAhb6MISDap3Yiz
Output for 5.4.16
3f9lvms78IYKXnnABRAo6JZOkWtUWDxP
Output for 5.4.15
JkjIVnq9UaObaMNSENqrKyqp2wlJ9yJH
Output for 5.4.14
Vuxhhb5mXNPrD3Gz5HdkBLaNfmPDaAkV
Output for 5.4.13
iMLvkdgEcTzoINvp2MJd3r2nFm0HKCNS
Output for 5.4.12
IhEFWdwBewGMr2H5BWeQErkbUEwy36TB
Output for 5.4.11
f0rMZ9KfUEXFDTMTV8cEh3cXljRNHPqN
Output for 5.4.10
fCeph4PddATHNBLP8brtQphSmtNj4Xc9
Output for 5.4.9
ccTLLQFexwRkwUQ5h4dQt9Hu0B62XrK1
Output for 5.4.8
XtjdOnkT9mE3NxMCqDHNHk4GozoU4cIR
Output for 5.4.7
1W6uaYwRgi7TDNrYYTQgsTRFKm3Dx4jn
Output for 5.4.6
2NLw1rI5zVkYnbcZFmIKIAhAGNp0gSJ9
Output for 5.4.5
OfBER8I24kzoVFyqX6DX3glIIJuXTctx
Output for 5.4.4
ZDWvnl9EW2U3SKn5fZoYM8un4uTlluja
Output for 5.4.3
VXjUqXY6zLrnc8qrRJtMtO61Fu5mg643
Output for 5.4.2
5D6r7BhC3tr4JuGfAiZfixDeEF44J4zE
Output for 5.4.1
L0ZLP2TkimtxRz6Jqq1vSQvcyli6Chse
Output for 5.4.0
ZDXNZPc7gRO2eBBKf7rvGkTCGcdYbQv2
Output for 5.3.29
u51JNFIslFijOR0Vp4ZS1A9HBkNzArcU
Output for 5.3.28
TH0v8VqtUEzHaZMnd1NjoqF51VBKFwkp
Output for 5.3.27
ye0JqOtK0p1waCe5JV2nkdBEUTDsS1bh
Output for 5.3.26
YwMu8S68RrgnPWNShwZAeRRPWV4CJUmy
Output for 5.3.25
OdMqauO8th1VtJPyQhGJIL1ieZVvnA23
Output for 5.3.24
J7gk8URhTKP0jrmcipiQvi5XfuYUdkkN
Output for 5.3.23
juA7FwZvILeVBOTqEuVfcG1BLFDm8gLg
Output for 5.3.22
K3WrdPs33nBktWDaNzJ0RgPZ8xSpWizx
Output for 5.3.21
v18gvbtNCs6yyljjSwyU4Pqgb6S1ahev
Output for 5.3.20
xTyr7qpPCLHBV6NqTC4Fg5XsJ5CvrBVO
Output for 5.3.19
viu8Fp4D8GhBWR56uFqAA7j98HJKMV69
Output for 5.3.18
5Ss97mxtcNIPD2M8GnTkqvuAJgdot1Wn
Output for 5.3.17
22MO9EkmrOdHq1JTj5nHxYi1KBQN0fE1
Output for 5.3.16
1AIkKrn3jSb73d9hUiwa2p5LR0dzxWnn
Output for 5.3.15
YRgMEDHsFe8xmJcB42IXKVN7nFn8kvx0
Output for 5.3.14
EZas2HDAC1kbYBJfbrZ0vtTwoBhUBSo6
Output for 5.3.13
zSBr0d70ddC3apOeL73rrhOc07WhFEA6
Output for 5.3.12
YqY2JuL2bkM8Kbzlgg3dhDXAdAxwzc9n
Output for 5.3.11
Bzc1uL96UfhqfiDAFC7PXuTQGR6OiNdK
Output for 5.3.10
4n022JnBqlYXiHG7yvX4srvXw6dPz4Ds
Output for 5.3.9
Z20hXnMSpepaxtb3XH4K72BEIQOd7FFW
Output for 5.3.8
uTZqUF4Rx7wlYcXx3OxG0J8hokhmsNQN
Output for 5.3.7
Zzk3pzK9GKiBXPruXCdV3mKolBJACtZr
Output for 5.3.6
l5xP1nwG6brLv2xR4Qmhpn8oVcpadeMp
Output for 5.3.5
2zFVpZrTcrjigCaxv74b9xA7cRka2N7S
Output for 5.3.4
Og596VnLcfKp3o37bTi0R2XFjZRy24vF
Output for 5.3.3
IVsncvx2ZCUWNqC0Z9g7AUayTHxYlSTT
Output for 5.3.2
gmXkcxhoof7cOhlVMxt1x4fWbMYGkuvr
Output for 5.3.1
mwXMCbZK0CY57ZD1Zd0ZxXueTXgqLHxX
Output for 5.3.0
GrFCVXJSON1YcpGaTFyUqPaT7SpVB6q9
Output for 5.2.17
HCExWS2Uyi3mZALltW40XOSIJo0mL5Bj
Output for 5.2.16
35rPRT342ugO9jpMc86VHccIkpgjpwwh
Output for 5.2.15
4lWlS4cKwQgTxUcsgUqwjRAQoAXMQlqK
Output for 5.2.14
S4wVnFg80Nnh1MOZrSYDfvj06F2IVxlD
Output for 5.2.13
Ics8LN0e7XCXOD3yFEWIZ2pQtRXhL4jk
Output for 5.2.12
qcASdL0oWAZ1OXeTOEDogGnfHmyE4soj
Output for 5.2.11
xDRrmw0N91igIaYzbPJMGmQMcKbcBxoY
Output for 5.2.10
jL2JK6gx7aATrfabxquV0RyU3KeSgbjp
Output for 5.2.9
r8hCIHvFrFWiMbWFVtpYOxVDVdMAGSZY
Output for 5.2.8
RTL4i6NlIPIkrOKFIpZMRBDQ8F4RV3hD
Output for 5.2.7
5chKDIKx55RPanypYrTuYWBiLrBN9tO3
Output for 5.2.6
dBkmW3k2YjArfyZHLm53aYllgi8IrGpu
Output for 5.2.5
IhHhsbBb38gMhY5323p0x2CiHp81ak3I
Output for 5.2.4
P5xCwVSOg4392LkqcLBMS8fkPTjUn7N4
Output for 5.2.3
yJsr5gWVY2nzyNDW7lR2Gg87pzUGNoOc
Output for 5.2.2
Uaj7AlYweHcozAzKq306vwMRG4sAmY87
Output for 5.2.1
Q5C3JdxtPKgtoUSGWp0mG9dSdKe2qaf7
Output for 5.2.0
jJqvy7XF7ZdpzJj9u1chbZtocU0MJoST
Output for 5.1.6
OBd0t6Qf5yZNGXi60orhIc2WaOAcgQwV
Output for 5.1.5
1fJdcNJnpbYgHWtV4IFKeSeSvb0Wtznj
Output for 5.1.4
lHo8mK8GhiouRFaNm0YHMiC605HWYGoa
Output for 5.1.3
yn4ibeKknarZmp4BYkibesxBsn8BWmAk
Output for 5.1.2
LWj9cwQQeLjFvXHgtLVFBzFCjyxKSsut
Output for 5.1.1
qb1zAMJy4W6ziwJutqmhAuscEXXpwnzN
Output for 5.1.0
EJQEAu0vEaLlqYAFCyAEtlOnrhf08XTC
Output for 5.0.5
fjq35uemHNj6T15NIykZz5dNsL8unLet
Output for 5.0.4
YbWGg0eVsL1UJvPD316GD2suEs2wraKf
Output for 5.0.3
IvjdqkTm2pmZ085uTzf6o9wlk19uQiqo
Output for 5.0.2
acSHlmZMUS8oxhmxvxivnc7hOPVrrYor
Output for 5.0.1
NQ9SQ5SAWwQthfMehj2zpHAOBPTvRJzu
Output for 5.0.0
eMrNMyXxymzbNLxzYhhg78Nt0ANIDoYI
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/WgapB on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/WgapB on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/WgapB on line 4
Process exited with code 255.