File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 * @param string
5252 * @return bool TRUE if the current version is $version or higher
5353 */
54- function is_php ($ version = ' 5.3.0 ' )
54+ function is_php ($ version )
5555 {
5656 static $ _is_php ;
5757 $ version = (string ) $ version ;
5858
5959 if ( ! isset ($ _is_php [$ version ]))
6060 {
61- $ _is_php [$ version ] = ( version_compare (PHP_VERSION , $ version) >= 0 );
61+ $ _is_php [$ version ] = version_compare (PHP_VERSION , $ version, ' >= ' );
6262 }
6363
6464 return $ _is_php [$ version ];
Original file line number Diff line number Diff line change @@ -480,6 +480,7 @@ Release Date: Not Released
480480 - Added function :func: `function_usable() ` to work around a bug in `Suhosin <http://www.hardened-php.net/suhosin/> `.
481481 - Removed the third (`$php_error `) argument from function :func: `log_message() `.
482482 - Changed internal function ``load_class() `` to accept a constructor parameter instead of (previously unused) class name prefix.
483+ - Removed default parameter value of :func: `is_php() `.
483484
484485 - :doc: `Output Library <libraries/output >` changes include:
485486
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ loading any libraries or helpers.
1313
1414 <div class =" custom-index container" ></div >
1515
16- .. function :: is_php([ $version = '5.3.0'] )
16+ .. function :: is_php($version)
1717
1818 :param string $version: Version number
1919 :returns: TRUE if the running PHP version is at least the one specified or FALSE if not
2020 :rtype: bool
2121
22- Determines of the PHP version being used is greater than the
22+ Determines if the PHP version being used is greater than the
2323 supplied version number.
2424
2525 Example::
You can’t perform that action at this time.
0 commit comments