3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $salts = ['abcdefghijklmnopqrstuvwxyz012345', 'saltsaltsaltsaltsaltsaltsaltsalt', 'pearpearpearpearpearpearpearpear', 'orangeorangeorangeorangeorangeor']; $passwords = ['password', 'password', 'apple', 'apple']; $basicPasswordSaltPermutations = []; $passwordsCount = count($passwords); for ($i = 0; $i < $passwordsCount; $i++) { $salt = $salts[$i]; $password = $passwords[$i]; $basicPasswordSaltPermutations[] = [$salt.$password, $password.$salt, $salt.$password.$salt]; } $algos = hash_algos(); var_dump($basicPasswordSaltPermutations);
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(4) { [0]=> array(3) { [0]=> string(40) "abcdefghijklmnopqrstuvwxyz012345password" [1]=> string(40) "passwordabcdefghijklmnopqrstuvwxyz012345" [2]=> string(72) "abcdefghijklmnopqrstuvwxyz012345passwordabcdefghijklmnopqrstuvwxyz012345" } [1]=> array(3) { [0]=> string(40) "saltsaltsaltsaltsaltsaltsaltsaltpassword" [1]=> string(40) "passwordsaltsaltsaltsaltsaltsaltsaltsalt" [2]=> string(72) "saltsaltsaltsaltsaltsaltsaltsaltpasswordsaltsaltsaltsaltsaltsaltsaltsalt" } [2]=> array(3) { [0]=> string(37) "pearpearpearpearpearpearpearpearapple" [1]=> string(37) "applepearpearpearpearpearpearpearpear" [2]=> string(69) "pearpearpearpearpearpearpearpearapplepearpearpearpearpearpearpearpear" } [3]=> array(3) { [0]=> string(37) "orangeorangeorangeorangeorangeorapple" [1]=> string(37) "appleorangeorangeorangeorangeorangeor" [2]=> string(69) "orangeorangeorangeorangeorangeorappleorangeorangeorangeorangeorangeor" } }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/HDoAd on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/HDoAd on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/HDoAd on line 2
Process exited with code 255.