3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function GeneratePassword($i,$s){ $r='';$s=str_split($s); for($i; $i>0; $i--)$r.=$s[array_rand($s)]; return $r; } echo GeneratePassword(5,'wffweg');
Output for 7.1.0
weffw
Output for 7.0.14
wgweg
Output for 7.0.10
fggef
Output for 5.5.34, 7.0.9
gwffg
Output for 7.0.8
fefwe
Output for 7.0.7
wwfwg
Output for 7.0.6
ffwff
Output for 7.0.5
gffgg
Output for 7.0.4
geegg
Output for 7.0.3
effwf
Output for 7.0.2
eeewe
Output for 7.0.1
gegfe
Output for 7.0.0
wfefw
Output for hhvm-3.12.0
gefef
Output for hhvm-3.10.0
ffegf
Output for 5.6.28
fwfwe
Output for 5.6.25
gwwwg
Output for 5.6.24
wegwg
Output for 5.6.23
fefwf
Output for 5.6.22
fwwwe
Output for 5.3.13, 5.6.21
fefff
Output for 5.6.20
ffwfg
Output for 5.6.19
gwwff
Output for 5.6.18
wfgff
Output for 5.6.17
wwgww
Output for 5.6.16
efewf
Output for 5.5.28, 5.6.15
wfwff
Output for 5.4.40, 5.6.14
wwfwe
Output for 5.6.13
wewgf
Output for 5.6.12
fwewf
Output for 5.6.11
eefgf
Output for 5.6.10
wweef
Output for 5.6.3, 5.6.9
gwwwe
Output for 5.6.8
fffff
Output for 5.6.7
gfewf
Output for 5.6.6
wewge
Output for 5.5.4, 5.6.0, 5.6.5
eewwf
Output for 5.6.4
ffggf
Output for 5.6.2
wggfg
Output for 5.6.1
wwwgf
Output for 5.5.38
wfeww
Output for 5.5.37
wewwf
Output for 5.5.14, 5.5.36
egwew
Output for 5.5.35
wwwee
Output for 5.5.33
gewwg
Output for 5.5.32
wwwwf
Output for 5.5.31
fweww
Output for 5.4.6, 5.4.36, 5.5.30
fwfwf
Output for 5.5.29
fgwwe
Output for 5.5.27
ewege
Output for 5.5.26
eewee
Output for 5.5.22, 5.5.25
wfwfw
Output for 5.5.24
egewf
Output for 5.5.23
wwefg
Output for 5.5.21
wgwww
Output for 5.5.19 - 5.5.20
fgwww
Output for 5.5.18
wwwgg
Output for 5.5.16
fwefw
Output for 5.5.15
ewfef
Output for 5.5.13
ffwwf
Output for 5.5.12
weeww
Output for 5.1.3, 5.5.11
fwfew
Output for 5.5.10
wwfww
Output for 5.5.9
fwgwf
Output for 5.5.8
wffwg
Output for 5.5.7
fweeg
Output for 5.5.6
wwefe
Output for 5.5.5
gfgee
Output for 5.4.0, 5.5.3
fwffe
Output for 5.5.2
ewfew
Output for 5.5.1
wwfgw
Output for 5.5.0
wwefw
Output for 5.4.45
wfege
Output for 5.4.5, 5.4.44
fwwff
Output for 5.0.4, 5.3.4, 5.3.16, 5.4.43
wwwfw
Output for 5.4.42
fewww
Output for 5.4.41
wewgw
Output for 5.4.39
eewew
Output for 5.4.38
ffewe
Output for 5.4.37
wewef
Output for 5.4.35
wgfwe
Output for 5.4.34
fwgfw
Output for 5.4.32
wwfeg
Output for 5.4.31
feeef
Output for 5.4.30
ewwww
Output for 5.4.29
gwwfw
Output for 5.4.28
egwwe
Output for 5.4.27
wwfwf
Output for 5.4.26
wewew
Output for 5.4.25
ffwgf
Output for 5.4.24
wfwgg
Output for 5.4.23
gfwgg
Output for 5.1.0, 5.4.22
gwwww
Output for 5.4.21
eefef
Output for 5.4.20
wwgff
Output for 5.4.19
wweee
Output for 5.4.18
gwgff
Output for 5.4.17
wwwew
Output for 5.4.16
ffffg
Output for 5.4.15
effge
Output for 5.4.14
wgfef
Output for 5.4.13
gwwfg
Output for 5.4.12
eewwe
Output for 5.4.11
wffff
Output for 5.3.21, 5.4.10
eeffw
Output for 5.4.9
egwgw
Output for 5.4.8
gefwe
Output for 5.4.7
gefwf
Output for 5.4.4
fgwfw
Output for 5.4.3
fwwfw
Output for 5.4.2
efeff
Output for 5.4.1
wwfge
Output for 5.3.29
fwwwf
Output for 5.3.28
fffew
Output for 5.3.27
fewfe
Output for 5.3.26
fwgef
Output for 5.3.25
efwwf
Output for 5.3.24
wwfef
Output for 5.3.23
gfefw
Output for 5.3.22
ewfgf
Output for 5.3.20
wffgw
Output for 5.3.19
eefwf
Output for 5.3.18
wfwwe
Output for 5.3.17
fwegf
Output for 5.3.15
wffew
Output for 5.3.14
fefww
Output for 5.3.12
wggee
Output for 5.3.11
efwgf
Output for 5.3.10
fwfwg
Output for 5.3.9
wgfew
Output for 5.3.8
ggfeg
Output for 5.2.9, 5.3.7
wwwfg
Output for 5.3.6
feeff
Output for 5.3.5
wwffw
Output for 5.3.3
ewfff
Output for 5.3.2
fwwww
Output for 5.2.12, 5.3.1
ewefw
Output for 5.3.0
eweef
Output for 5.2.17
fwffw
Output for 5.2.16
wweff
Output for 5.2.15
wwgeg
Output for 5.2.14
fwgff
Output for 5.2.13
fewwe
Output for 5.2.11
wwfff
Output for 5.2.10
fgfww
Output for 5.2.8
ggfff
Output for 5.2.7
fgwge
Output for 5.2.6
wegew
Output for 5.2.5
feefw
Output for 5.2.4
gffwf
Output for 5.2.3
ewffw
Output for 5.2.2
wwgfg
Output for 5.2.1
efggg
Output for 5.2.0
wfwgw
Output for 5.1.6
wggwg
Output for 5.1.5
wwfew
Output for 5.0.3, 5.1.4
ffwfe
Output for 5.1.2
wwfgg
Output for 5.1.1
ffwwe
Output for 5.0.5
wffwe
Output for 5.0.2
wfwww
Output for 5.0.1
ffewf
Output for 5.0.0
gweef
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: str_split() in /in/VejMm on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: str_split() in /in/VejMm on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: str_split() in /in/VejMm on line 3