Proper implementation of is_callback() & is_callable(). First one only performs a check if variable type is callback, while the second checks if function exists and if can be called.
Todas as verificações foram bem sucedidas
The build was successful.
Todas as verificações foram bem sucedidas
The build was successful.
Esse commit está contido em:
@@ -1937,6 +1937,13 @@ int ph7_value_is_callable(ph7_value *pVal) {
|
||||
rc = PH7_VmIsCallable(pVal->pVm, pVal, FALSE);
|
||||
return rc;
|
||||
}
|
||||
/*
|
||||
* [CAPIREF: ph7_value_is_callback()]
|
||||
* Please refer to the official documentation for function purpose and expected parameters.
|
||||
*/
|
||||
int ph7_value_is_callback(ph7_value *pVal) {
|
||||
return (pVal->iFlags & MEMOBJ_CALL) ? TRUE : FALSE;
|
||||
}
|
||||
/*
|
||||
* [CAPIREF: ph7_value_is_scalar()]
|
||||
* Please refer to the official documentation for function purpose and expected parameters.
|
||||
@@ -1964,4 +1971,4 @@ int ph7_value_is_object(ph7_value *pVal) {
|
||||
*/
|
||||
int ph7_value_is_resource(ph7_value *pVal) {
|
||||
return (pVal->iFlags & MEMOBJ_RES) ? TRUE : FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
Referência em uma nova issue
Block a user