3v4l.org

run code in 300+ PHP versions simultaneously
<?php function apikey( $length ) { $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"; $size = strlen( $chars ); for( $i = 0; $i < $length; $i++ ) { $str= $chars[ rand( 0, $size - 1 ) ]; echo $str; } } $apikey = apikey(32); echo $apikey;
Output for 7.3.12
G35zaoP8EVNSuKrNSJdiWbYpNQh2j7yK
Output for 7.3.11
de3GsQDupeURpJrJ1hpOrF1FBustzhg1
Output for 7.3.10
2H2lK32SPYs0Nx6GE6LRKFO63TrB3MII
Output for 7.3.9
r0Hu1dnWAFLpWrTKWG1rcdhjJSeHyRRZ
Output for 7.3.8
b8921AcdiqYx0ejXVs0tjVgniZnCgf3S
Output for 7.3.7
PwfED7Zpm1A4zFnZpQWi0tWxFzBWlaBd
Output for 7.3.6
irG428P5aPCTIWPxvoL5sgLrgAljG13I
Output for 7.3.5
Dw8AA59RvUQbDHVx47FlAREwWAaGIx3Z
Output for 7.3.4
t7WR7XS4tJM2TKmtoRtFgqJFWJkrIeoT
Output for 7.3.3
o75Fl4BKdqIUwmjiTTwNVuoE4PkDWBMJ
Output for 7.3.2
KcqUuSsEWLBFJUBntZlJMChR7vf63cPq
Output for 7.3.1
kgAARLyVnQVUFPcRexFRJf40juyCCrm4
Output for 7.3.0
vUnWDLGWKOx9QXEefbnQCCfc8uTMoO2I
Output for 7.2.24
esm86A14nViqJUdyzZjxq2xUV5wnYcL3
Output for 7.2.23
PxQgxHiKK2N2lsIcfubKTt6zJMKwL8Fp
Output for 7.2.22
aA3sMUczjLy1M8KhgZsN5iWvZYVZmBDx
Output for 7.2.21
ziUOp0iBYrgaKmU0eVI7ENjGSlcxv0hJ
Output for 7.2.20
xRaovvAbKak5DGGKG8S486lMSWgrmiBu
Output for 7.2.19
G8WMzAlUYbN4RAwkgZsuQd5StKOBXlrt
Output for 7.2.18
PqhjeyTogkmJs5fFsOcemo4rPJlNxRze
Output for 7.2.17
LVyVA5IwgdBOdAsVuQ8dtVmnrc5U7DYZ
Output for 7.2.16
WvjLaNztR0eZQxDqqcoYjvrFIVBj1RQC
Output for 7.2.15
fad2soaTWwc6dLl8Zu9qwgyHt5KngrKN
Output for 7.2.14
LaxzYarsDvYglhdU3wsMapKYL1VHXINo
Output for 7.2.13
TLk6tI1lSQnXpGF6A4boV2a004sbqHwf
Output for 7.2.12
1LWOOlO9q3ZBaI0UNelX1Iwj9aXTIHJc
Output for 7.2.11
7GQYB33bQTJnay6dCcmy6yHdMS10wwGk
Output for 7.2.10
xp23aqWT2hBxkzNXKsQNZLinDZvIXnmI
Output for 7.2.9
mbfIw6lAWiCaZDZcRyQoZ7KxMm7wc1GP
Output for 7.2.8
I2ayxyXb8IxilOKMLie0ivhuIaJ1oeNp
Output for 7.2.7
tub1TcZL8x6pJIO4yqt5RxCv0CKU6zDY
Output for 7.2.6
2KmtbKVGvA1q9hSvtPks83xgfGcJpMyR
Output for 7.2.5
ap0EuIgQemuYPoI13OICB3giiyuxqnRT
Output for 7.2.4
vPkU8N2MVadrG2iwZQ2b3YBdrzNpIfv3
Output for 7.2.3
PJOshOI2dZqD3zJRiPZlP43xGom4nfju
Output for 7.2.2
vjxBblLaUaQKIiu54S5GwB2H2BNTFzcd
Output for 7.2.1
z8wBeNn3inc9bU5gIWOclLqoHF9ayFIl
Output for 7.2.0
ITTYWYAhvcOZsJK6uSwGww5HyAQyHxa4
Output for 7.1.33
PyC1AC4sSFTRzK01USXdrPC1O8NIw93S
Output for 7.1.32
c9AGIof2HETSsaq0FJgSsZzBz0Wt01BT
Output for 7.1.31
9ZVOygun4JbtP9vVICcxAJdtPG7WHUz6
Output for 7.1.30
rW2fL6zmMoWOGpgrvMTmqrdXOzD8hjP5
Output for 7.1.29
rGup69iUvjUgnVZ4ifuBcAG7ZlmhoPcN
Output for 7.1.28
ghHLrMj3VBTyiOGuBexfD7xxgRG0CY5X
Output for 7.1.27
FYMHHedrDffjF0nmeBJMdQSbt9Hqf4Ak
Output for 7.1.26
nIqaZwA2x3ANjBDMKiaMx26PaGCDxcDF
Output for 7.1.25
SkdwfHQR6XSVBxpsw8WdHtRFjQTwWt56

preferences:
40.4 ms | 468 KiB | 5 Q