Skip to content

Instantly share code, notes, and snippets.

@wecodelaravel
Forked from hearvox/php-checks.php
Created May 7, 2019 01:31
Show Gist options
  • Save wecodelaravel/e38b7bf8d1c148298ac3b31b32818559 to your computer and use it in GitHub Desktop.
Save wecodelaravel/e38b7bf8d1c148298ac3b31b32818559 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