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 . "`is'"); } $nums = array(); foreach (range(1, 26) as $num) { $nums[] = $num; } $val = strtolower($val); //die(preg_replace('`asda`is', 123, 'this bullasda')); $ret = preg_replace($lets, $nums, $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) "51b99b0f01"
Output for 7.0.14
<pre>string(10) "51b99b0f00"
Output for 7.0.6
<pre>string(10) "5728a631d1"
Output for 7.0.5
<pre>string(10) "570ccce9c7"
Output for 7.0.4
<pre>string(10) "570cccea7e"
Output for 7.0.3
<pre>string(10) "570ccceb4a"
Output for 7.0.2
<pre>string(10) "570cccebed"
Output for 7.0.1
<pre>string(10) "570cccec1c"
Output for 7.0.0
<pre>string(10) "570cccec7f"
Output for hhvm-3.12.0
<pre>string(10) "570ccceab9"
Output for hhvm-3.10.0
<pre>string(10) "570ccced21"
Output for 5.6.21
<pre>string(10) "57271103ae"
Output for 5.6.20
<pre>string(10) "570ccce972"
Output for 5.6.19
<pre>string(10) "570cccea2d"
Output for 5.6.18
<pre>string(10) "570ccceae6"
Output for 5.6.17
<pre>string(10) "570ccceb79"
Output for 5.6.16
<pre>string(10) "570ccceca9"
Output for 5.6.15
<pre>string(10) "570cccecd5"
Output for 5.6.14
<pre>string(10) "570ccced4e"
Output for 5.6.13
<pre>string(10) "570ccceda8"
Output for 5.6.12
<pre>string(10) "570cccee80"
Output for 5.6.11
<pre>string(10) "570cccef14"
Output for 5.6.10
<pre>string(10) "570cccf00b"
Output for 5.6.9
<pre>string(10) "570cccf045"
Output for 5.6.8
<pre>string(10) "570cccf138"
Output for 5.6.7
<pre>string(10) "570cccf18b"
Output for 5.6.6
<pre>string(10) "570cccf246"
Output for 5.6.5
<pre>string(10) "570cccf30d"
Output for 5.6.4
<pre>string(10) "570cccf38c"
Output for 5.6.3
<pre>string(10) "570cccf3df"
Output for 5.6.2
<pre>string(10) "570cccf48d"
Output for 5.6.1
<pre>string(10) "570cccf4b9"
Output for 5.6.0
<pre>string(10) "570cccf4e4"
Output for 5.5.35
<pre>string(10) "5741b05292"
Output for 5.5.34
<pre>string(10) "570ccce999"
Output for 5.5.33
<pre>string(10) "570cccea52"
Output for 5.5.32
<pre>string(10) "570ccceb20"
Output for 5.5.31
<pre>string(10) "570cccebb1"
Output for 5.5.30
<pre>string(10) "570ccced7a"
Output for 5.5.29
<pre>string(10) "570cccee0c"
Output for 5.5.28
<pre>string(10) "570ccceeb0"
Output for 5.5.27
<pre>string(10) "570cccef45"
Output for 5.5.26
<pre>string(10) "570cccefa3"
Output for 5.5.25
<pre>string(10) "570cccf0ad"
Output for 5.5.24
<pre>string(10) "570cccf160"
Output for 5.5.23
<pre>string(10) "570cccf1e5"
Output for 5.5.22
<pre>string(10) "570cccf275"
Output for 5.5.21
<pre>string(10) "570cccf2a0"
Output for 5.5.20
<pre>string(10) "570cccf366"
Output for 5.5.19
<pre>string(10) "570cccf40f"
Output for 5.5.18
<pre>string(10) "570cccf438"
Output for 5.5.16
<pre>string(10) "570cccf51b"
Output for 5.5.15
<pre>string(10) "570cccf5b0"
Output for 5.5.14
<pre>string(10) "570cccf5dc"
Output for 5.5.13
<pre>string(10) "570cccf65f"
Output for 5.5.12
<pre>string(10) "570cccf6b4"
Output for 5.5.11
<pre>string(10) "570cccf721"
Output for 5.5.10
<pre>string(10) "570cccf76b"
Output for 5.5.9
<pre>string(10) "570cccf7c2"
Output for 5.5.8
<pre>string(10) "570cccf7ed"
Output for 5.5.7
<pre>string(10) "570cccf871"
Output for 5.5.6
<pre>string(10) "570cccf8c4"
Output for 5.5.5
<pre>string(10) "570cccf94b"
Output for 5.5.4
<pre>string(10) "570cccf99a"
Output for 5.5.3
<pre>string(10) "570cccf9eb"
Output for 5.5.2
<pre>string(10) "570cccfa20"
Output for 5.5.1
<pre>string(10) "570cccfa81"
Output for 5.5.0
<pre>string(10) "570cccfb09"
Output for 5.4.45
<pre>string(10) "570cccedd6"
Output for 5.4.44
<pre>string(10) "570ccceede"
Output for 5.4.43
<pre>string(10) "570cccef74"
Output for 5.4.42
<pre>string(10) "570cccefd0"
Output for 5.4.41
<pre>string(10) "570cccf073"
Output for 5.4.40
<pre>string(10) "570cccf111"
Output for 5.4.39
<pre>string(10) "570cccf1b9"
Output for 5.4.38
<pre>string(10) "570cccf21a"
Output for 5.4.37
<pre>string(10) "570cccf2ca"
Output for 5.4.36
<pre>string(10) "570cccf33a"
Output for 5.4.35
<pre>string(10) "570cccf3b3"
Output for 5.4.34
<pre>string(10) "570cccf462"
Output for 5.4.32
<pre>string(10) "570cccf541"
Output for 5.4.31
<pre>string(10) "570cccf58c"
Output for 5.4.30
<pre>string(10) "570cccf612"
Output for 5.4.29
<pre>string(10) "570cccf63c"
Output for 5.4.28
<pre>string(10) "570cccf68a"
Output for 5.4.27
<pre>string(10) "570cccf6df"
Output for 5.4.26
<pre>string(10) "570cccf749"
Output for 5.4.25
<pre>string(10) "570cccf797"
Output for 5.4.24
<pre>string(10) "570cccf821"
Output for 5.4.23
<pre>string(10) "570cccf846"
Output for 5.4.22
<pre>string(10) "570cccf8ea"
Output for 5.4.21
<pre>string(10) "570cccf921"
Output for 5.4.20
<pre>string(10) "570cccf972"
Output for 5.4.19
<pre>string(10) "570cccf9c6"
Output for 5.4.18
<pre>string(10) "570cccfa56"
Output for 5.4.17
<pre>string(10) "570cccfad4"
Output for 5.4.16
<pre>string(10) "570cccfb34"
Output for 5.4.15
<pre>string(10) "570cccfbaf"
Output for 5.4.14
<pre>string(10) "570cccfbd9"
Output for 5.4.13
<pre>string(10) "570cccfc39"
Output for 5.4.12
<pre>string(10) "570cccfc92"
Output for 5.4.11
<pre>string(10) "570cccfd18"
Output for 5.4.10
<pre>string(10) "570cccfd70"
Output for 5.4.9
<pre>string(10) "570cccfd9a"
Output for 5.4.8
<pre>string(10) "570cccfe1e"
Output for 5.4.7
<pre>string(10) "570cccfe72"
Output for 5.4.6
<pre>string(10) "570cccfe9a"
Output for 5.4.5
<pre>string(10) "570cccff1e"
Output for 5.4.4
<pre>string(10) "570cccff64"
Output for 5.4.3
<pre>string(10) "570cccff8a"
Output for 5.4.2
<pre>string(10) "570ccd000f"
Output for 5.4.1
<pre>string(10) "570ccd0065"
Output for 5.4.0
<pre>string(10) "570ccd0088"
Output for 5.3.29
<pre>string(10) "570cccf568"
Output for 5.3.28
<pre>string(10) "570cccf89c"
Output for 5.3.27
<pre>string(10) "570cccfaa9"
Output for 5.3.26
<pre>string(10) "570cccfb59"
Output for 5.3.25
<pre>string(10) "570cccfb85"
Output for 5.3.24
<pre>string(10) "570cccfc10"
Output for 5.3.23
<pre>string(10) "570cccfc67"
Output for 5.3.22
<pre>string(10) "570cccfcba"
Output for 5.3.21
<pre>string(10) "570cccfce7"
Output for 5.3.20
<pre>string(10) "570cccfd43"
Output for 5.3.19
<pre>string(10) "570cccfdbd"
Output for 5.3.18
<pre>string(10) "570cccfdef"
Output for 5.3.17
<pre>string(10) "570cccfe4f"
Output for 5.3.16
<pre>string(10) "570cccfebc"
Output for 5.3.15
<pre>string(10) "570cccfee2"
Output for 5.3.14
<pre>string(10) "570cccff42"
Output for 5.3.13
<pre>string(10) "570cccffb9"
Output for 5.3.12
<pre>string(10) "570cccffe0"
Output for 5.3.11
<pre>string(10) "570ccd003b"
Output for 5.3.10
<pre>string(10) "570ccd00b5"
Output for 5.3.9
<pre>string(10) "570ccd00d5"
Output for 5.3.8
<pre>string(10) "570ccd0103"
Output for 5.3.7
<pre>string(10) "570ccd0123"
Output for 5.3.6
<pre>string(10) "570ccd0148"
Output for 5.3.5
<pre>string(10) "570ccd016c"
Output for 5.3.4
<pre>string(10) "570ccd01cd"
Output for 5.3.3
<pre>string(10) "570ccd0218"
Output for 5.3.2
<pre>string(10) "570ccd025d"
Output for 5.3.1
<pre>string(10) "570ccd02cf"
Output for 5.3.0
<pre>string(10) "570ccd031a"
Output for 5.2.17
<pre>string(10) "570ccd018c"
Output for 5.2.16
<pre>string(10) "570ccd01ac"
Output for 5.2.15
<pre>string(10) "570ccd01ec"
Output for 5.2.14
<pre>string(10) "570ccd023d"
Output for 5.2.13
<pre>string(10) "570ccd027c"
Output for 5.2.12
<pre>string(10) "570ccd02ae"
Output for 5.2.11
<pre>string(10) "570ccd02ee"
Output for 5.2.10
<pre>string(10) "570ccd033c"
Output for 5.2.9
<pre>string(10) "570ccd035b"
Output for 5.2.8
<pre>string(10) "570ccd037b"
Output for 5.2.7
<pre>string(10) "570ccd039b"
Output for 5.2.6
<pre>string(10) "570ccd03da"
Output for 5.2.5
<pre>string(10) "570ccd041d"
Output for 5.2.4
<pre>string(10) "570ccd043c"
Output for 5.2.3
<pre>string(10) "570ccd045c"
Output for 5.2.2
<pre>string(10) "570ccd047d"
Output for 5.2.1
<pre>string(10) "570ccd04dc"
Output for 5.2.0
<pre>string(10) "570ccd0507"
Output for 5.1.6
<pre>string(10) "570ccd0525"
Output for 5.1.5
<pre>string(10) "570ccd055e"
Output for 5.1.4
<pre>string(10) "570ccd059e"
Output for 5.1.3
<pre>string(10) "570ccd05c3"
Output for 5.1.2
<pre>string(10) "570ccd05ea"
Output for 5.1.1
<pre>string(10) "570ccd0638"
Output for 5.1.0
<pre>string(10) "570ccd065c"
Output for 5.0.5
<pre>string(10) "570ccd0692"
Output for 5.0.4
<pre>string(10) "570ccd06d5"
Output for 5.0.3
<pre>string(10) "570ccd0721"
Output for 5.0.2
<pre>string(10) "570ccd0752"
Output for 5.0.1
<pre>string(10) "570ccd0796"
Output for 5.0.0
<pre>string(10) "570ccd07be"
Output for 4.3.0 - 4.4.9
<br /> <b>Warning</b>: uniqid() expects at least 1 parameter, 0 given in <b>/in/SinuM</b> on line <b>2</b><br /> <pre>bool(false)