Skip to content

Commit

Permalink
compare version using PHP_VERSION_ID
Browse files Browse the repository at this point in the history
To let opcode caches optimize cached code, the `PHP_VERSION_ID`
constant is used to detect the current PHP version instead of calling
`version_compare()` with `PHP_VERSION`.
  • Loading branch information
xabbuh committed Nov 17, 2014
1 parent 4d635ff commit ffa26b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Descriptor/TextDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ protected function describeApplication(Application $application, array $options
*/
private function formatDefaultValue($default)
{
if (version_compare(PHP_VERSION, '5.4', '<')) {
if (PHP_VERSION_ID < 50400) {
return str_replace('\/', '/', json_encode($default));
}

Expand Down

0 comments on commit ffa26b9

Please sign in to comment.