Skip to content

Commit 6c86b49

Browse files
committed
feat(zval): null()
1 parent 6393bb9 commit 6c86b49

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/types/zval.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ impl Zval {
5454
}
5555
}
5656

57+
/// Creates a null zval
58+
#[must_use]
59+
pub fn null() -> Zval {
60+
let mut zval = Zval::new();
61+
zval.set_null();
62+
zval
63+
}
64+
5765
/// Dereference the zval, if it is a reference.
5866
#[must_use]
5967
pub fn dereference(&self) -> &Self {

0 commit comments

Comments
 (0)