With a default phpcompatinfo.json
as detailed above, put in the src/
folder of the
CompatInfo source code, and invoke the following command :
$ phpcompatinfo analyser:run .
and you should obtain something like this :
Data Source Analysed Directories 7 Files 127 Global Analysis Count Cond PHP min Elements highlight Extensions 11 4 5.3.0 Core Namespaces 14 0 5.3.0 Bartlett\CompatInfo\Reference Interfaces 3 0 5.3.0 Bartlett\CompatInfo\Reference\ReferenceInterface Traits 0 0 Classes 140 1 5.3.0 Bartlett\CompatInfo\Reference\Extension\RarExtension User Functions 5 0 5.3.0 Bartlett\CompatInfo\Reference\closure-335-372 Internal Functions 47 2 5.2.0 json_encode Constants 13 3 5.3.0 __DIR__ Total 5.3.0
Let’s explain the results. We have 12 extensions, 4 optionals due to conditional code, with Core
that requires at least PHP 5.3.0,
and so on for all others components.
![]() | |
Since release 3.3.0 only, if you want to have a full report of all elements without to specify each analyser, just enter the following command : $ phpcompatinfo analyser:run . --php Since release 3.4.0, the |
To see details of conditional code (Cond
column in summary report), run following command :
$ phpcompatinfo analyser:run . condition
and you should obtain something like this :
Data Source Analysed Directories 7 Files 127 Conditional Code Analysis Condition REF EXT min/Max PHP min/Max class_exists(\PHP_Timer) user 4.0.0 defined(INTL_ICU_VERSION) intl 2.0.0b1 5.3.7 defined(OPENSSL_VERSION_NUMBER) openssl 5.2.0 5.2.0 defined(OPENSSL_VERSION_TEXT) openssl 5.2.0 5.2.0 function_exists(curl_version) curl 4.0.2 4.0.2 function_exists(event_priority_set) libevent 0.0.5 5.3.0 Total [6] 5.3.7