Asked  7 Months ago    Answers:  5   Viewed   46 times

Possible Duplicate:
Writing a function in php

I'm using the following code

echo 'Curl: ', function_exists('curl_version') ? 'Enabled' : 'Disabled';

this can get it enabled or disabled

but I would like to make as function say function name is _iscurl

then I can call it as following any where in my website code

if (_iscurl()){
  echo "this is enabled"; // will do an action
  echo "this is disabled"; // will do another action

almost same as my previous question check if allow_url_fopen is enabled or not



Just return your existing check from a function.

function _isCurl(){
    return function_exists('curl_version');
Wednesday, March 31, 2021
answered 7 Months ago

You should point to your vendor/autoload.php at Settings | PHP | PHPUnit when using PHPUnit via Composer.

This blog post has all the details (with pictures) to successfully configure IDE for such scenario:

Related usability ticket:

P.S. The WI-18388 ticket is already fixed in v8.0

Wednesday, March 31, 2021
answered 7 Months ago

On Mac OS X environment variables available in Terminal and for the normal applications can be different, check the related question for the solution how to make them similar.

Note that this solution will not work on Mountain Lion (10.8).

Saturday, May 29, 2021
answered 5 Months ago

Use ini_get() to get the value of certain configuration parameters:

if( ini_get('allow_url_fopen') ) {
   // lucky me...
Sunday, July 4, 2021
answered 4 Months ago
ApplicationInfo ai = 

boolean appStatus = ai.enabled;

Thanks to Amir

Sunday, August 1, 2021
answered 3 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :