We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e03b598 commit 71e316dCopy full SHA for 71e316d
CodeIgniter/Framework/core/Common.php
@@ -186,6 +186,25 @@ function is($key, $value = null)
186
187
// ------------------------------------------------------------------------
188
189
+if ( ! function_exists('boolify'))
190
+{
191
+ /**
192
+ * Convert common true/false strings into boolean values
193
+ *
194
+ * @param int|string $status
195
+ * @return bool
196
+ */
197
+ function boolify(int|string $status)
198
+ {
199
+ return filter_var(
200
+ $status,
201
+ FILTER_VALIDATE_BOOLEAN
202
+ );
203
+ }
204
+}
205
+
206
+// ------------------------------------------------------------------------
207
208
if ( ! function_exists('is_blank'))
209
{
210
/**
0 commit comments