summaryrefslogtreecommitdiffstats
path: root/user_guide/general
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide/general')
-rw-r--r--user_guide/general/common_functions.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html
index 980a5a969..1f4394424 100644
--- a/user_guide/general/common_functions.html
+++ b/user_guide/general/common_functions.html
@@ -59,6 +59,18 @@ Auto-loading Resources
<p>CodeIgniter uses a few functions for its operation that are globally defined, and are available to you at any point. These do not require loading any libraries or helpers.</p>
+<h2>is_php('<var>version_number</var>')</h2>
+
+<p>is_php() determines of the PHP version being used is greater than the supplied <var>version_number</var>.</p>
+
+<code>if (is_php('5.3.0'))<br />
+{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;$str = quoted_printable_encode($str);<br />
+}</code>
+
+<p>Returns boolean <kbd>TRUE</kbd> if the installed version of PHP is equal to or greater than the supplied version number. Returns <kbd>FALSE</kbd> if the installed version of PHP is lower than the supplied version number.</p>
+
+
<h2>is_really_writable('<var>path/to/file</var>')</h2>
<p>is_writable() returns TRUE on Windows servers when you really can't write to the file as the OS reports to PHP as FALSE only if the read-only attribute is marked. This function determines if a file is actually writable by attempting to write to it first. Generally only recommended on platforms where this information may be unreliable.</p>