3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = uniqid(); function getNumber($val) { $lets = array(); foreach (range('a', 'z') as $let) { $lets[] = ("'`" . $let . "`'"); } $num = range(1, 26); $val = strtolower($val); $ret = preg_replace($lets, $num, $val); $ret = substr($ret, 0, 10); return $ret; } $b = getNumber($a); echo "<pre>"; var_dump($b);
Output for 5.6.28, 7.1.0
<pre>string(10) "51b99a4701"
Output for 7.0.14
<pre>string(10) "51b99a4700"
Output for 7.0.6
<pre>string(10) "5740a4d625"
Output for 7.0.5
<pre>string(10) "570dd31529"
Output for 7.0.4
<pre>string(10) "570dd315eb"
Output for 7.0.3
<pre>string(10) "570dd316ca"
Output for 7.0.2
<pre>string(10) "570dd3175b"
Output for 7.0.1
<pre>string(10) "570dd3178e"
Output for 7.0.0
<pre>string(10) "570dd31803"
Output for hhvm-3.12.0
<pre>string(10) "570dd31637"
Output for hhvm-3.10.0
<pre>string(10) "570dd3188d"
Output for 5.6.21
<pre>string(10) "5727b2d87f"
Output for 5.6.20
<pre>string(10) "570dd314c2"
Output for 5.6.19
<pre>string(10) "570dd31590"
Output for 5.6.18
<pre>string(10) "570dd31664"
Output for 5.6.17
<pre>string(10) "570dd31703"
Output for 5.6.16
<pre>string(10) "570dd31830"
Output for 5.6.15
<pre>string(10) "570dd31855"
Output for 5.6.14
<pre>string(10) "570dd318b3"
Output for 5.6.13
<pre>string(10) "570dd31912"
Output for 5.6.12
<pre>string(10) "570dd319d2"
Output for 5.6.11
<pre>string(10) "570dd31a5d"
Output for 5.6.10
<pre>string(10) "570dd31b4b"
Output for 5.6.9
<pre>string(10) "570dd31b70"
Output for 5.6.8
<pre>string(10) "570dd31c6b"
Output for 5.6.7
<pre>string(10) "570dd31cba"
Output for 5.6.6
<pre>string(10) "570dd31d75"
Output for 5.6.5
<pre>string(10) "570dd31e2f"
Output for 5.6.4
<pre>string(10) "570dd31ec1"
Output for 5.6.3
<pre>string(10) "570dd31f1a"
Output for 5.6.2
<pre>string(10) "570dd31fb9"
Output for 5.6.1
<pre>string(10) "570dd31fe5"
Output for 5.6.0
<pre>string(10) "570dd3201e"
Output for 5.5.35
<pre>string(10) "5742f4621e"
Output for 5.5.34
<pre>string(10) "570dd314ef"
Output for 5.5.33
<pre>string(10) "570dd315bf"
Output for 5.5.32
<pre>string(10) "570dd3169d"
Output for 5.5.31
<pre>string(10) "570dd31730"
Output for 5.5.30
<pre>string(10) "570dd318e0"
Output for 5.5.29
<pre>string(10) "570dd31966"
Output for 5.5.28
<pre>string(10) "570dd31a05"
Output for 5.5.27
<pre>string(10) "570dd31a8b"
Output for 5.5.26
<pre>string(10) "570dd31ae6"
Output for 5.5.25
<pre>string(10) "570dd31bcb"
Output for 5.5.24
<pre>string(10) "570dd31c97"
Output for 5.5.23
<pre>string(10) "570dd31d22"
Output for 5.5.22
<pre>string(10) "570dd31da3"
Output for 5.5.21
<pre>string(10) "570dd31dda"
Output for 5.5.20
<pre>string(10) "570dd31e96"
Output for 5.5.19
<pre>string(10) "570dd31f44"
Output for 5.5.18
<pre>string(10) "570dd31f68"
Output for 5.5.16
<pre>string(10) "570dd32042"
Output for 5.5.15
<pre>string(10) "570dd320ed"
Output for 5.5.14
<pre>string(10) "570dd32125"
Output for 5.5.13
<pre>string(10) "570dd321a8"
Output for 5.5.12
<pre>string(10) "570dd3220f"
Output for 5.5.11
<pre>string(10) "570dd32260"
Output for 5.5.10
<pre>string(10) "570dd322a8"
Output for 5.5.9
<pre>string(10) "570dd32303"
Output for 5.5.8
<pre>string(10) "570dd32337"
Output for 5.5.7
<pre>string(10) "570dd323b5"
Output for 5.5.6
<pre>string(10) "570dd3241b"
Output for 5.5.5
<pre>string(10) "570dd32498"
Output for 5.5.4
<pre>string(10) "570dd324ef"
Output for 5.5.3
<pre>string(10) "570dd3254d"
Output for 5.5.2
<pre>string(10) "570dd3257b"
Output for 5.5.1
<pre>string(10) "570dd325c6"
Output for 5.5.0
<pre>string(10) "570dd32641"
Output for 5.4.45
<pre>string(10) "570dd31940"
Output for 5.4.44
<pre>string(10) "570dd31a2f"
Output for 5.4.43
<pre>string(10) "570dd31ab8"
Output for 5.4.42
<pre>string(10) "570dd31b1e"
Output for 5.4.41
<pre>string(10) "570dd31b9e"
Output for 5.4.40
<pre>string(10) "570dd31c3e"
Output for 5.4.39
<pre>string(10) "570dd31ce8"
Output for 5.4.38
<pre>string(10) "570dd31d52"
Output for 5.4.37
<pre>string(10) "570dd31e0c"
Output for 5.4.36
<pre>string(10) "570dd31e5b"
Output for 5.4.35
<pre>string(10) "570dd31ee8"
Output for 5.4.34
<pre>string(10) "570dd31f8b"
Output for 5.4.32
<pre>string(10) "570dd3206d"
Output for 5.4.31
<pre>string(10) "570dd320c0"
Output for 5.4.30
<pre>string(10) "570dd32151"
Output for 5.4.29
<pre>string(10) "570dd3217d"
Output for 5.4.28
<pre>string(10) "570dd321d5"
Output for 5.4.27
<pre>string(10) "570dd3223c"
Output for 5.4.26
<pre>string(10) "570dd32284"
Output for 5.4.25
<pre>string(10) "570dd322cc"
Output for 5.4.24
<pre>string(10) "570dd32362"
Output for 5.4.23
<pre>string(10) "570dd3238e"
Output for 5.4.22
<pre>string(10) "570dd32447"
Output for 5.4.21
<pre>string(10) "570dd32473"
Output for 5.4.20
<pre>string(10) "570dd324c4"
Output for 5.4.19
<pre>string(10) "570dd32522"
Output for 5.4.18
<pre>string(10) "570dd325a1"
Output for 5.4.17
<pre>string(10) "570dd3261f"
Output for 5.4.16
<pre>string(10) "570dd32664"
Output for 5.4.15
<pre>string(10) "570dd326db"
Output for 5.4.14
<pre>string(10) "570dd32712"
Output for 5.4.13
<pre>string(10) "570dd32763"
Output for 5.4.12
<pre>string(10) "570dd327b7"
Output for 5.4.11
<pre>string(10) "570dd32847"
Output for 5.4.10
<pre>string(10) "570dd32893"
Output for 5.4.9
<pre>string(10) "570dd328bd"
Output for 5.4.8
<pre>string(10) "570dd32954"
Output for 5.4.7
<pre>string(10) "570dd3299e"
Output for 5.4.6
<pre>string(10) "570dd329d3"
Output for 5.4.5
<pre>string(10) "570dd32a65"
Output for 5.4.4
<pre>string(10) "570dd32aad"
Output for 5.4.3
<pre>string(10) "570dd32ad7"
Output for 5.4.2
<pre>string(10) "570dd32b7d"
Output for 5.4.1
<pre>string(10) "570dd32bd5"
Output for 5.4.0
<pre>string(10) "570dd32c05"
Output for 5.3.29
<pre>string(10) "570dd32093"
Output for 5.3.28
<pre>string(10) "570dd323e1"
Output for 5.3.27
<pre>string(10) "570dd325f1"
Output for 5.3.26
<pre>string(10) "570dd32690"
Output for 5.3.25
<pre>string(10) "570dd326b3"
Output for 5.3.24
<pre>string(10) "570dd3273c"
Output for 5.3.23
<pre>string(10) "570dd3278f"
Output for 5.3.22
<pre>string(10) "570dd327e1"
Output for 5.3.21
<pre>string(10) "570dd3281b"
Output for 5.3.20
<pre>string(10) "570dd32869"
Output for 5.3.19
<pre>string(10) "570dd32900"
Output for 5.3.18
<pre>string(10) "570dd32929"
Output for 5.3.17
<pre>string(10) "570dd3297a"
Output for 5.3.16
<pre>string(10) "570dd32a0c"
Output for 5.3.15
<pre>string(10) "570dd32a39"
Output for 5.3.14
<pre>string(10) "570dd32a8c"
Output for 5.3.13
<pre>string(10) "570dd32b0c"
Output for 5.3.12
<pre>string(10) "570dd32b51"
Output for 5.3.11
<pre>string(10) "570dd32baa"
Output for 5.3.10
<pre>string(10) "570dd32c2b"
Output for 5.3.9
<pre>string(10) "570dd32c54"
Output for 5.3.8
<pre>string(10) "570dd32c8f"
Output for 5.3.7
<pre>string(10) "570dd32cbb"
Output for 5.3.6
<pre>string(10) "570dd32ce2"
Output for 5.3.5
<pre>string(10) "570dd32d13"
Output for 5.3.4
<pre>string(10) "570dd32d90"
Output for 5.3.3
<pre>string(10) "570dd32de2"
Output for 5.3.2
<pre>string(10) "570dd32e3f"
Output for 5.3.1
<pre>string(10) "570dd32ebf"
Output for 5.3.0
<pre>string(10) "570dd32f19"
Output for 5.2.17
<pre>string(10) "570dd32d3c"
Output for 5.2.16
<pre>string(10) "570dd32d65"
Output for 5.2.15
<pre>string(10) "570dd32db7"
Output for 5.2.14
<pre>string(10) "570dd32e16"
Output for 5.2.13
<pre>string(10) "570dd32e6b"
Output for 5.2.12
<pre>string(10) "570dd32e99"
Output for 5.2.11
<pre>string(10) "570dd32ee3"
Output for 5.2.10
<pre>string(10) "570dd32f42"
Output for 5.2.9
<pre>string(10) "570dd32f76"
Output for 5.2.8
<pre>string(10) "570dd32f99"
Output for 5.2.7
<pre>string(10) "570dd32fc2"
Output for 5.2.6
<pre>string(10) "570dd3300d"
Output for 5.2.5
<pre>string(10) "570dd33051"
Output for 5.2.4
<pre>string(10) "570dd33079"
Output for 5.2.3
<pre>string(10) "570dd330ba"
Output for 5.2.2
<pre>string(10) "570dd330ef"
Output for 5.2.1
<pre>string(10) "570dd33170"
Output for 5.2.0
<pre>string(10) "570dd3319b"
Output for 5.1.6
<pre>string(10) "570dd331d4"
Output for 5.1.5
<pre>string(10) "570dd33256"
Output for 5.1.4
<pre>string(10) "570dd332be"
Output for 5.1.3
<pre>string(10) "570dd3330b"
Output for 5.1.2
<pre>string(10) "570dd33345"
Output for 5.1.1
<pre>string(10) "570dd3338e"
Output for 5.1.0
<pre>string(10) "570dd333b4"
Output for 5.0.5
<pre>string(10) "570dd333f2"
Output for 5.0.4
<pre>string(10) "570dd33440"
Output for 5.0.3
<pre>string(10) "570dd3348c"
Output for 5.0.2
<pre>string(10) "570dd334ca"
Output for 5.0.1
<pre>string(10) "570dd3350d"
Output for 5.0.0
<pre>string(10) "570dd33531"
Output for 4.3.0 - 4.4.9
<br /> <b>Warning</b>: uniqid() expects at least 1 parameter, 0 given in <b>/in/PPCpv</b> on line <b>2</b><br /> <pre>bool(false)