File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
ext/standard/tests/strings Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ hex2bin(); function test
3
+ --CREDITS--
4
+ edgarsandi - <edgar.r.sandi@gmail.com>
5
+ --FILE--
6
+ <?php
7
+
8
+ var_dump (bin2hex (hex2bin ('012345 ' )) == '012345 ' );
9
+ var_dump (bin2hex (hex2bin ('abc123 ' )) == 'abc123 ' );
10
+ var_dump (bin2hex (hex2bin ('123abc ' )) == '123abc ' );
11
+ var_dump (bin2hex (hex2bin ('FFFFFF ' )) == 'ffffff ' );
12
+
13
+ ?>
14
+ --EXPECTF--
15
+ bool(true)
16
+ bool(true)
17
+ bool(true)
18
+ bool(true)
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ hex2bin(); function test
3
+ --CREDITS--
4
+ edgarsandi - <edgar.r.sandi@gmail.com>
5
+ --FILE--
6
+ <?php
7
+ var_dump (hex2bin ('AH ' ));
8
+ var_dump (hex2bin ('HA ' ));
9
+ ?>
10
+ --EXPECTF--
11
+ Warning: hex2bin(): Input string must be hexadecimal string in %s on line %d
12
+ bool(false)
13
+
14
+ Warning: hex2bin(): Input string must be hexadecimal string in %s on line %d
15
+ bool(false)
You can’t perform that action at this time.
0 commit comments