phpversion

suggest change

Introduction

When working with various libraries and their associated requirements, it is often necessary to know the version of current PHP parser or one of it’s packages.

This function accepts a single optional parameter in the form of extension name: phpversion('extension'). If the extension in question is installed, the function will return a string containing version value. However, if the extension not installed FALSE will be returned. If the extension name is not provided, the function will return the version of PHP parser itself.

Example

print "Current PHP version: " . phpversion();
// Current PHP version: 7.0.8

print "Current cURL version: " . phpversion( 'curl' );
// Current cURL version: 7.0.8
// or
// false, no printed output if package is missing

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Debugging:
* Xdebug
* phpversion

Table Of Contents
2 Arrays
4 Types
10 Cookies
14 JSON
15 SOAP
17 cURL
19 XML
21 Traits
35 UTF-8
36 URLs
38 PHPDoc
41 Loops
44 Closur
51 Debugging
72 YAML
77 Cache
78 Streams
81 PDO
82 SQLite3
83 Sockets
87 MongoDB
93 IMAP
94 Redis
95 Imagick
102 APCu
108 PSR