Skip to content

Instantly share code, notes, and snippets.

@hearvox
Created October 25, 2017 14:23
Show Gist options
  • Save hearvox/cb2665baeeee4716aa6464e5920350f7 to your computer and use it in GitHub Desktop.
Save hearvox/cb2665baeeee4716aa6464e5920350f7 to your computer and use it in GitHub Desktop.
Checking php extensions, functions, version, etc.
<?php
echo $check_fn = ( function_exists( 'http_parse_message' ) ) ? 'yo' : 'no';
echo ' ';
echo $check_ext = ( extension_loaded( 'pecl_http' ) ) ? 'yo' : 'no';
if ( class_exists('My_Class') ) {
$my_class = new My_Class();
}
echo 'Current PHP version: ' . phpversion();
php_info();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment