note 73126 added to function.phpversion
| From: | mauron at maurtopia dot com | Date: | Fri, 09 Feb 2007 23:11:09 +0000 |
| Subject: | note 73126 added to function.phpversion | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-123186@lists.php.net to get a copy of this message | ||
A faster way to check the version of PHP being used is this code.
<?php
if (strpos(phpversion(), 5) === 0)
$is5 = true;
else
$is5 = false;
?>
For the most part the difference won't matter, but if you're running a site with large
amounts of traffic it's worth keeping in mind.
----
Server IP: 64.71.164.2
Probable Submitter: 67.165.191.109
----
Manual Page -- http://www.php.net/manual/en/function.phpversion.php
Edit -- https://master.php.net/note/edit/73126
Del: integrated -- https://master.php.net/note/delete/73126/integrated
Del: useless -- https://master.php.net/note/delete/73126/useless
Del: bad code -- https://master.php.net/note/delete/73126/bad+code
Del: spam -- https://master.php.net/note/delete/73126/spam
Del: non-english -- https://master.php.net/note/delete/73126/non-english
Del: in docs -- https://master.php.net/note/delete/73126/in+docs
Del: other reasons-- https://master.php.net/note/delete/73126
Reject -- https://master.php.net/note/reject/73126
Search -- https://master.php.net/manage/user-notes.php