Skip to content

Commit e1dd8cd

Browse files
David Stocktonpetk
authored andcommitted
Add test for null return on version_compare with bad operator
1 parent c5f9855 commit e1dd8cd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
Ensures null is returned if versions are compared with invalid operator
3+
--CREDITS--
4+
David Stockton - <[email protected]> - i3logix PHP Testfest 2017
5+
--SKIPIF--
6+
7+
--FILE--
8+
<?php
9+
var_dump(version_compare('1.2', '2.1', '??'));
10+
?>
11+
--EXPECT--
12+
NULL

0 commit comments

Comments
 (0)