File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ foreach ($datas as $data)
31
31
for ($ i = 0 ; $ i < $ len - 1 ; $ i ++)
32
32
{
33
33
$ sub = substr ($ str , 0 , $ i );
34
- $ sub .= mcrypt_create_iv (30 , MCRYPT_DEV_URANDOM );
34
+ $ sub .= random_bytes (30 );
35
35
$ php_errormsg = null ;
36
36
$ v = msgpack_unserialize ($ sub );
37
37
}
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Profiling perf test.
3
3
--SKIPIF--
4
- <?php
5
- if (!extension_loaded ("msgpack " ) || !extension_loaded ("mcrypt " )) {
6
- echo "skip " ;
7
- }
8
- ?>
9
4
--FILE--
10
5
<?php
11
6
$ data_array = array ();
12
7
for ($ i = 0 ; $ i < 5000 ; $ i ++) {
13
- $ data_array [mcrypt_create_iv (10 , MCRYPT_DEV_URANDOM )] = mcrypt_create_iv (10 , MCRYPT_DEV_URANDOM );
8
+ $ data_array [random_bytes (10 )] = random_bytes (10 );
14
9
}
15
10
16
11
$ time_start = microtime (true );
You can’t perform that action at this time.
0 commit comments