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); die($ret); $ret = substr($ret, 0, 10); return $ret; } $b = getNumber($a); echo "<pre>"; var_dump($b);
Output for 7.1.0
51b99b1d0160a
Output for 7.0.14
51b99b1d00ea9
Output for 7.0.12
51b99b1d0106a
Output for 7.0.6
572844ffcfb9d
Output for 7.0.5
57001c68e1448
Output for 7.0.4
56e117ccbea56
Output for 7.0.3
56ebaba27a86a
Output for 7.0.2
56f142a28f371
Output for 7.0.1
56f2dadb6fb43
Output for 7.0.0
56f6e5dc7dace
Output for 5.6.28
51b99b1d01192
Output for 5.6.21
5726b1df528c1
Output for 5.6.20
57094748e06c2
Output for 5.6.19
56dd957ed484b
Output for 5.6.18
56e73d2d05fe1
Output for 5.6.17
56ed39a6109aa
Output for 5.6.16
56f84226b920d
Output for 5.6.15
56f9a00d9595c
Output for 5.6.14
56ff0a03b5e29
Output for 5.6.13
571064be4832b
Output for 5.6.12
57166a9e327b6
Output for 5.6.11
571ac1df31e3f
Output for 5.6.10
571d7e4b30ebe
Output for 5.6.9
57206704e0653
Output for 5.6.8
57237ada390ae
Output for 5.6.7
57457b4f6eee0
Output for 5.5.35
57414410aebd8
Output for 5.5.34
570aba5f01350
Output for 5.5.33
56df0e8aeabd8
Output for 5.5.32
56e9fa5a4d5bc
Output for 5.5.31
56eeb2384f917
Output for 5.5.30
56fdb28d90436
Output for 5.5.29
57127c5bb8e42
Output for 5.5.28
5717e7bfb94f2
Output for 5.5.27
57195cbc29df7
Output for 5.5.26
571ef20aa0a47
Output for 5.5.25
5721ea3c2b502
Output for 5.5.24
5743427bd62b9
Output for 5.4.45
56c5a40003592
Output for 5.4.44
56c5a4009aa24
Output for 5.4.43
56c5a401a1fde
Output for 5.4.42
56c5a401d5019
Output for 5.4.41
56c5a402bac24
Output for 5.4.40
56c5a40367fdf
Output for 5.4.39
56c5a403f3aac
Output for 5.4.38
56c5a4045ef00
Output for 5.4.37
56c5a405074e2
Output for 5.4.36
56c5a4058da31
Output for 5.4.35
56c5a40613571
Output for 5.4.34
56c5a406a6d2d
Output for 5.4.32
56c5a4078f38e
Output for 5.4.31
56c5a407e126f
Output for 5.4.30
56c5a40870a42
Output for 5.4.29
56c5a4089de49
Output for 5.4.28
56c5a408e96f1
Output for 5.4.27
56c5a4094cef3
Output for 5.4.26
56c5a4099bc57
Output for 5.4.25
56c5a40a1936f
Output for 5.4.24
56c5a40a66af8
Output for 5.4.23
56c5a40a9009b
Output for 5.4.22
56c5a40b46857
Output for 5.4.21
56c5a40b72b49
Output for 5.4.20
56c5a40bc838d
Output for 5.4.19
56c5a40c5419f
Output for 5.4.18
56c5a40cac7ff
Output for 5.4.17
56c5a40d4209a
Output for 5.4.16
56c5a40d95021
Output for 5.4.15
56c5a40e253f1
Output for 5.4.14
56c5a40e488f3
Output for 5.4.13
56c5a40e91802
Output for 5.4.12
56c5a40ee400c
Output for 5.4.11
56c5a40f63ef8
Output for 5.4.10
56c5a40fbeefa
Output for 5.4.9
56c5a40febccb
Output for 5.4.8
56c5a41066a7d
Output for 5.4.7
56c5a410cc60f
Output for 5.4.6
56c5a410f1819
Output for 5.4.5
56c5a4117ce63
Output for 5.4.4
56c5a411d249e
Output for 5.4.3
56c5a412001e5
Output for 5.4.2
56c5a4127c11c
Output for 5.4.1
56c5a412d0179
Output for 5.4.0
56c5a412f3d66
Output for 5.3.29
56c5a407b7446
Output for 5.3.28
56c5a40aecfd6
Output for 5.3.27
56c5a40d14abd
Output for 5.3.26
56c5a40dc8ab6
Output for 5.3.25
56c5a40deecdf
Output for 5.3.24
56c5a40e6c12e
Output for 5.3.23
56c5a40eb778a
Output for 5.3.22
56c5a40f154ad
Output for 5.3.21
56c5a40f40082
Output for 5.3.20
56c5a40f94f16
Output for 5.3.19
56c5a41022251
Output for 5.3.18
56c5a41044e4a
Output for 5.3.17
56c5a4109eb3a
Output for 5.3.16
56c5a4112936c
Output for 5.3.15
56c5a41151441
Output for 5.3.14
56c5a411aa8c5
Output for 5.3.13
56c5a4122d5ec
Output for 5.3.12
56c5a41259028
Output for 5.3.11
56c5a412a7235
Output for 5.3.10
56c5a4132a99b
Output for 5.3.9
56c5a4135d433
Output for 5.3.8
56c5a413897e3
Output for 5.3.7
56c5a413b4867
Output for 5.3.6
56c5a413e06cc
Output for 5.3.5
56c5a41416af0
Output for 5.3.4
56c5a41489693
Output for 5.3.3
56c5a414e988d
Output for 5.3.2
56c5a41546fc1
Output for 5.3.1
56c5a415b72d3
Output for 5.3.0
56c5a416258f7
Output for 5.2.17
56c5a41438a98
Output for 5.2.16
56c5a414616fc
Output for 5.2.15
56c5a414b18af
Output for 5.2.14
56c5a4151b5ad
Output for 5.2.13
56c5a4156e534
Output for 5.2.12
56c5a41592d27
Output for 5.2.11
56c5a415ecf64
Output for 5.2.10
56c5a4164572b
Output for 5.2.9
56c5a416686c6
Output for 5.2.8
56c5a4168fde7
Output for 5.2.7
56c5a416b64f7
Output for 5.2.6
56c5a416ee605
Output for 5.2.5
56c5a4173bc32
Output for 5.2.4
56c5a4175c51b
Output for 5.2.3
56c5a4178475a
Output for 5.2.2
56c5a417ada0e
Output for 5.2.1
56c5a41824528
Output for 5.2.0
56c5a4184532e
Output for 5.1.6
56c5a4186c7c6
Output for 5.1.5
56c5a418ae372
Output for 5.1.4
56c5a418e7f39
Output for 5.1.3
56c5a4191adf3
Output for 5.1.2
56c5a4193fdfd
Output for 5.1.1
56c5a41977207
Output for 5.1.0
56c5a419aa977
Output for 5.0.5
56c5a419eb03d
Output for 5.0.4
56c5a41a309d3
Output for 5.0.3
56c5a41a6b25a
Output for 5.0.2
56c5a41ab109f
Output for 5.0.1
56c5a41ae8873
Output for 5.0.0
56c5a41b1ce1f
Output for 4.3.0 - 4.4.9
Warning: uniqid() expects at least 1 parameter, 0 given in /in/j7T2F on line 2