-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Documentation
Search for
Menu
This is the function that has been used for xml conversion to array.
This class is used for cls visibility.
This class is used for encryption decryption.
isValidEmail() : mixed
Check if an email address is valid.
checkPhoneNo() : int
Check if the given string is a valid phone number.
sanitizeEmail() : string
Sanitize an email address.
sanitizeString() : string
Sanitizes a string by removing multiple spaces, stripping tags, and escaping special characters.
gen_uuid() : string
Generates a UUID / unique ID of specified length
getUserRequest() : array<string|int, mixed>
Retrieves user request data from $_GET and $_POST.
datediff() : string
It is the function that has been to find difference between two dates in diffrent units like month,year and days.
strIntoComma() : string
Converts a string into a comma-separated list of values, removing extra spaces and newlines.
getDatesListFromRange() : array<string|int, mixed>
Generates a list of dates between a given start and end date.
xml2array() : array<string|int, mixed>
Convert an XML string to a nested array.
xmltoArray() : array<string|int, mixed>
This function that is used to convert xml into array.
array2xml() : string
This function has been used to convert array to xml.
short_string() : string
Shorten a string to a specified length.
findtext() : string
Find a substring within a string between two given substrings and update the starting index.
findtextnew() : string
This function has been used to find text (new function : to find between substrings).
getAttribute() : string
Extracts the value of the specified attribute from an HTML/XML tag.
removecomments() : string
Remove comments and specific tags from a string.
removephrase() : string
Removes a specified phrase from a given string.
getSmartyTemplate() : object
Find and get the Smarty template or retrieves an instance of the Smarty template engine with appropriate settings and assigns common global variables.
strtodate() : string
Converts a date string to the format 'mm/dd/yyyy'.
datetostr() : string
Converts a date string in the format MM/DD/YYYY to a string in the format YYYYMMDD000000.
dayafter() : string
This function has been used to convert date.
f_random() : string
Generates a random string with specified length and type.
redirect_header() : void
Redirects to a given URL with an optional message and delay time.
f_date() : string
Format date in given format
trimWhiteSpace() : string
Trims whitespace characters from the beginning and end of a string.
removeCDATA() : string
Removes CDATA tags from a given string
validXMLChr() : string
Removes invalid characters from XML content.
removeHighAscii() : string
Removes high ASCII characters from the input string and replaces them with spaces.
remfiles() : bool
Deletes all files in the given directory that match the specified pattern.
writeFile() : bool
Write data to a file
uc_unique() : string
This function has been used to return unique number.
GUID64_encode() : string
Encodes an integer using base 64 and returns a string of a specified size.
GUID64_decode() : int
Decodes a base-64 encoded GUID string into a decimal number.
uc_unique_rev() : mixed
This function has been used to reverse unique no.. Decode a unique string generated with uc_unique.
dec2string() : string|false
Converts a decimal number to a string representation in the given base.
string2dec() : string|false
Convert a string in a given base to a decimal number.
getMicroTime() : float
Returns the current Unix timestamp with microseconds
getTimeByTimezone() : string
Returns the current time in the specified time zone.
setAssessmentDateTime() : string
Sets the assessment date and time based on a specified timezone option.
getEndDate() : string
Get the end date based on the start date, end date or number of days.
isDatePassed() : bool
Check if the given date has already passed based on the given timezone.
joinPaths() : string
This is the function that has been used to join paths.
addProtocol() : string
Add a protocol to a URL if it does not already have one.
rprint_r() : array<string|int, mixed>
Recursive version of print_r that returns the result as an associative array.
__ucd() : void
Outputs the given variable for debugging purposes only if the server name is 'localhost'.
str2Assoc() : array<string|int, mixed>
Convert a string to an associative array
ucIsset() : bool
Check if a variable is set and not empty, and optionally compare it to a given value.
ucInStr() : bool
This is the function that has been used to return haystack.
ucTblStr() : string
Create a table row from an array of data.
ucItemsByArray() : array<string|int, mixed>
This is the function that has been used to return array by uc items.
get_string_between() : string
Returns a string between two delimiters in a larger string.
ucArrayByItem() : array<string|int, mixed>
Return an associative array indexed by a specific item in a nested array.
strToHex() : string
Convert a string to its hexadecimal representation.
hex2bin() : string
Converts a hexadecimal string to its binary representation.
generateAuthToken() : string
Generates an authentication token using AES-256-CBC encryption.
extractAuthToken() : string|null
Extracts a string from an encrypted token generated using generateAuthToken function.
array_merge_uc() : array<string|int, mixed>
Merge two arrays, optionally recursively.
array_keys_uc() : array<string|int, mixed>
Returns all the keys or specific keys of an array, optionally filtered by value.
array_unique_uc() : array<string|int, mixed>
Removes duplicate values from an array.
count_uc() : int
Counts the number of elements in an array.
array_change_key_uc() : array<string|int, mixed>
Returns a new array with the keys changed to the value of the specified key in the original array
multi_array_sort() : mixed
Sorts a multidimensional array by a specified key
obfuscate_link() : string
Obfuscates a given link by encoding it using base64 and rawurlencode.
unobfuscate_link() : string
Converts a number of seconds into a human-readable string
seconds2human() : string
This is the function that has been used to convert seconds to human.
friendlyDate() : string
Returns a human-readable string representing the time elapsed since the provided timestamp
formatISBN() : string
Format a given ISBN number into a standard format with hyphens.
addToArchive() : void
Adds files from a directory to a ZIP archive.
dateafter() : string
Returns the date after a specified number of days after a given date.
timezoneDoesDST() : bool|int
Check if the given timezone observes Daylight Saving Time (DST).
get_time_difference() : string
Calculates the time difference between two time values
convertToUTC() : int
Convert a given time to UTC time
generateAccessToken() : array<string|int, mixed>
Generates an access token for a client with the given ID and email.
verifyAccessToken() : string
Verify the access token using JWT decode
refreshAccessToken() : object|bool
This is the function that has been used to refresh access token.
friendlyguid() : string
Converts a GUID to a more friendly format by replacing confusing characters.
getUserIP() : string
Get the user's IP address.
array_column_uc() : array<string|int, mixed>
This is the function that has been used to get columns of array.
bin2ip() : string
This is the function that has been used to get bin from IP.
removeStrSpace() : string
Removes whitespace characters from a string.
json_validate() : mixed
Validate a JSON string and return the decoded result.
resizeImage() : void
Resize an image and save it to the specified path.
uf_findkey() : string
Find the key from a string
utf8json() : string
Encode an array to UTF-8 encoded JSON string
getContentsGUIDs() : mixed
Function to get contentGUIDs based on filters
getDisabledGuids() : array<string|int, mixed>
Remove elements from an array based on keys present in another array.
removeInvisible() : array<string|int, mixed>
This function eliminate invisible guids from the question list
delete_from_coverage() : array<string|int, mixed>
Deletes a given content GUID from a coverage array.
setAnswerSeq() : array<string|int, mixed>
Sets answer sequence for an array of answers.
getAnswerSeqStr() : array<string|int, mixed>
Returns the answer sequence string based on the given parameters.
get_grade_formula_default() : string|array<string|int, mixed>
Get the default grade formula in a JSON-encoded string or as an array
get_grade_scale_default() : string|array<string|int, mixed>
Returns the default grade scale as a JSON string or array.
get_course_config_default() : mixed
It is the function that has been used to get default config detail.
get_coverage_default() : string
Returns the default coverage for a course, in JSON format.
getTestName() : string
Returns the name of a test based on its type and optional details.
zfill() : string
Pads the given number with leading zeros until it reaches the given length.
get_range() : mixed
Returns a value within a specific range, or a default value if not set
get_default() : mixed
Returns a default value if the primary value is empty, else returns the primary value.
replaceconst() : string
Replaces constants in a string with their corresponding values.
replaceimage() : string
Replaces images in a string with secure URLs, if necessary.
replacelinebreak() : string
Replace line break tags and syntax tags with proper
tags for syntax highlightingbyte2array() : array<string|int, mixed>
Converts a byte to an array of bits, using a given default array as a template.
arrayFilterBasedOnKey() : mixed
array2byte() : string
This function is used to convert array into byte.
get_ddl_data_uc() : array<string|int, mixed>
This function is used to get ddl data.
getFlashCardContentSubtypes() : mixed
Get FlashCard content subtypes.
extractArray() : array<string|int, mixed>
This function is used to extract array.
unsetArrayData() : array<string|int, mixed>
This function is used to unset array data.
findexts() : string|void
Returns the file extension of a given filename
get_file_extension() : array<string|int, mixed>
Get the file extension and name from a file path.
getSeqList() : array<string|int, mixed>
A function to Get Sequence List of Guid.
getOrderType() : array<string|int, mixed>
This function is used to get order type.
calcPrice() : array<string|int, mixed>
Calculate the net price and discount information based on the given data.
extractLicence() : array<string|int, mixed>|string
Extracts license information from an array of licenses.
findtextnew_withouttrim() : string|false
Searches for a string between two other strings in a given string
findContentImage() : array<string|int, mixed>
This function is used to find content image.
findAssets() : array<string|int, mixed>
It is the function that has been used to detect assets.
findSpanGuids() : array<string|int, mixed>
Extracts GUIDs from tags in the given string.
findDevices() : array<string|int, mixed>
Find all device images in a string.
api_convert_test_session_options2array() : array<string|int, mixed>
Convert test session options from integer to an associative array.
api_convert_test_session_array2options() : int
Convert test session options array to binary format.
api_convert_assignment_schedule_options2array() : array<string|int, mixed>
Convert an assignment schedule options integer to an associative array.
api_convert_assignment_schedule_array2options() : array<string|int, mixed>
It is the function that has been used to convert test session array into options.
score2grade() : string
A function for score to grade.
result2grade() : array<string|int, mixed>
Converts a set of results to grades based on a given grade scale.
getCurrentOSFromServer() : string
Returns the current operating system from the server.
json_encode_uc() : string|false
Encode the given data as JSON with support for encoding Unicode characters
json_decode_uc() : mixed
Decodes a JSON string and returns the resulting value.
rand_uc() : int
Generate a random number within a given range.
strip_all_tags_uc() : string
A function for to strip tags.
file_get_contents_uc() : string|false
Read entire contents of a file into a string
debug_backtrace_uc() : array<string|int, mixed>
A function for to get debug trace.
sanitize_title_with_dashes_uc() : string
Sanitizes a title, replacing whitespace and a few other characters with dashes. * Limits the output to alphanumeric characters, underscore (_) and dash (-).
file_get_contents_curl() : string
Retrieve the contents of a URL using cURL.
create_redis_key() : string
Generates a Redis key using a given string value and prefix.
get_sys_mac_address() : string|null
Retrieve the MAC address of the current system.
array_merge_preserve() : array<string|int, mixed>
Merge arrays while preserving keys.
__ucc() : mixed
This is the function that has been used to debug and print data in jigyaasa.
generateNewPassword() : string
Generates a new random password.
getLMSPlatformIDFromURL() : string
Returns the LMS platform ID based on the given URL.
kelvinToCelsius() : mixed
functions.php : 20
Check if an email address is valid.
isValidEmail(string $email[, bool $ignore_number = false ]) : mixed
$email : string
The email address to check.
$ignore_number : bool = false
Optional. Whether to ignore numbers or not. Default is false.
mixed —
Returns the email address if valid, false otherwise.
functions.php : 48
Check if the given string is a valid phone number.
checkPhoneNo(string $str) : int
$str : string
The phone number to be checked.
int —
Returns 1 if the phone number is valid, otherwise returns 0.
functions.php : 61
Sanitize an email address.
sanitizeEmail(string $email) : string
$email : string
The email address to be sanitized.
string —
The sanitized email address.
functions.php : 72
Sanitizes a string by removing multiple spaces, stripping tags, and escaping special characters.
sanitizeString(string $str) : string
$str : string
The string to be sanitized.
string —
The sanitized string.
functions.php : 88
Generates a UUID / unique ID of specified length
gen_uuid([int $len = 8 ][, string $salt = 'ucertify' ]) : string
$len : int = 8
The desired length of the ID (defaults to 8)
$salt : string = 'ucertify'
The salt to use for generating the ID (defaults to 'ucertify')
string —
The generated unique ID
functions.php : 111
Retrieves user request data from $_GET and $_POST.
getUserRequest([array<string|int, mixed> $data = array() ][, bool $isStrip = true ]) : array<string|int, mixed>
$data : array<string|int, mixed> = array()
The data array to populate with request values.
$isStrip : bool = true
Whether to strip tags from request values or not (defaults to true).
array<string|int, mixed> —
The populated data array.
functions.php : 149
It is the function that has been to find difference between two dates in diffrent units like month,year and days.
datediff(string $interval, string $datefrom, string $dateto[, string $using_timestamps = false ]) : string
$interval : string
denotes interval.
$datefrom : string
denotes datefrom.
$dateto : string
denotes dateto.
$using_timestamps : string = false
denotes using_timestamps.
string —
as whole response of function.
functions.php : 253
Converts a string into a comma-separated list of values, removing extra spaces and newlines.
strIntoComma([string $str = '' ]) : string
$str : string = ''
The string to convert.
string —
The comma-separated list of values.
functions.php : 268
Generates a list of dates between a given start and end date.
getDatesListFromRange(string $start, string $end[, string $format = 'Y-m-d' ]) : array<string|int, mixed>
$start : string
Start date in 'Y-m-d' format
$end : string
End date in 'Y-m-d' format
$format : string = 'Y-m-d'
Date format for the output list, defaults to 'Y-m-d'
array<string|int, mixed> —
List of dates between the start and end date
functions.php : 290
Convert an XML string to a nested array.
xml2array(string $xml) : array<string|int, mixed>
$xml : string
The XML string to convert.
array<string|int, mixed> —
The resulting nested array.
functions.php : 337
This function that is used to convert xml into array.
xmltoArray(string $xml) : array<string|int, mixed>
$xml : string
denotes xml string.
array<string|int, mixed> —
as response of the function.
functions.php : 459
This function has been used to convert array to xml.
array2xml(string $mainTag, string $ary[, string $id = '' ]) : string
$mainTag : string
denotes mainTag.
$ary : string
denotes ary.
$id : string = ''
is the id.
string —
as overall response of the function.
functions.php : 504
Shorten a string to a specified length.
short_string(string $str[, int $length = 80 ], int $direction[, bool $remove_single_quote = true ]) : string
$str : string
The string to shorten.
$length : int = 80
The maximum length of the shortened string.
$direction : int
The direction from which to shorten the string. 1 for left, 2 for right, 0 for both sides.
$remove_single_quote : bool = true
Whether or not to remove single quotes from the string.
string —
The shortened string.
functions.php : 538
Find a substring within a string between two given substrings and update the starting index.
findtext(string $str, string $fstr, string $lstr, string $i) : string
$str : string
denotes str.
$fstr : string
denotes fstr.
$lstr : string
is the lstr.
$i : string
is the i.
string —
as overall response of the function.
functions.php : 552
This function has been used to find text (new function : to find between substrings).
findtextnew(string $str, string $fstr, string $lstr, string &$i) : string
$str : string
denotes str.
$fstr : string
denotes fstr.
$lstr : string
is the lstr.
$i : string
is the i.
string —
as overall response of the function.
functions.php : 591
Extracts the value of the specified attribute from an HTML/XML tag.
getAttribute(string $strmle, string $tag, string $attribute, int &$i) : string
$strmle : string
The input string containing the tag.
$tag : string
The name of the tag to extract the attribute from.
$attribute : string
The name of the attribute to extract.
$i : int
The index to start searching for the tag.
string —
The value of the specified attribute, or an empty string if the attribute is not found.
functions.php : 646
Remove comments and specific tags from a string.
removecomments(string $str) : string
$str : string
The input string.
string —
The modified string.
functions.php : 665
Removes a specified phrase from a given string.
removephrase(string $str, string $keystart, string $keyend) : string
$str : string
The string to remove the phrase from.
$keystart : string
The starting phrase to remove.
$keyend : string
The ending phrase to remove.
string —
The resulting string with the phrase removed.
functions.php : 701
Find and get the Smarty template or retrieves an instance of the Smarty template engine with appropriate settings and assigns common global variables.
getSmartyTemplate([string $templatedir = 'layout/templates' ][, string $basedir = false ][, string $usesitename = true ]) : object
$templatedir : string = 'layout/templates'
denotes templatedir.
$basedir : string = false
denotes basedir.
$usesitename : string = true
is the usesitename.
object —
as overall response of the function.
functions.php : 788
Converts a date string to the format 'mm/dd/yyyy'.
strtodate([string $str = '' ]) : string
$str : string = ''
The date string to convert.
string —
The formatted date string
functions.php : 811
Converts a date string in the format MM/DD/YYYY to a string in the format YYYYMMDD000000.
datetostr([string $date = '' ]) : string
$date : string = ''
The date to convert. If empty, the current date and time will be used.
string —
The date string in the format YYYYMMDD000000.
functions.php : 834
This function has been used to convert date.
dayafter(string $date, int $dayafter) : string
Returns the date that is a certain number of days after a given date. If no date is specified, defaults to the current date.
$date : string
The starting date (format: 'YYYYMMDD').
$dayafter : int
The number of days after the starting date.
string —
The resulting date (format: 'YYYYMMDD000000').
functions.php : 875
Generates a random string with specified length and type.
f_random([int $a_digit = 5 ][, int $a_rantype = 1 ]) : string
$a_digit : int = 5
The length of the random string.
$a_rantype : int = 1
The type of random string: 1 for alphanumeric, 2 for alphabetic, 3 for numeric.
string —
The generated random string.
functions.php : 918
Redirects to a given URL with an optional message and delay time.
redirect_header(string $url[, int $time = 3 ][, string $message = '' ]) : void
$url : string
The URL to redirect to.
$time : int = 3
The delay time in seconds before redirecting (default is 3 seconds).
$message : string = ''
The message to display (default is an empty string).
void —
functions.php : 955
Format date in given format
f_date(string $dt[, string $fmt = 'd-M-y' ]) : string
$dt : string
Date string to format
$fmt : string = 'd-M-y'
Format string (default: 'd-M-y')
string —
Formatted date string
functions.php : 974
Trims whitespace characters from the beginning and end of a string.
trimWhiteSpace(string $str) : string
$str : string
The input string to remove CDATA tags from
string —
The resulting string with CDATA tags removed
functions.php : 985
Removes CDATA tags from a given string
removeCDATA(string $str) : string
$str : string
The input string to remove CDATA tags from
string —
The resulting string with CDATA tags removed
functions.php : 1004
Removes invalid characters from XML content.
validXMLChr(string $content) : string
$content : string
The XML content to validate.
string —
The validated XML content.
functions.php : 1033
Removes high ASCII characters from the input string and replaces them with spaces.
removeHighAscii(string $content) : string
$content : string
The input string to sanitize.
string —
The sanitized string with high ASCII characters replaced with spaces.
functions.php : 1049
Deletes all files in the given directory that match the specified pattern.
remfiles(string $path, string $match) : bool
$path : string
The directory to search for files in.
$match : string
The pattern to match file names against.
bool —
Returns
true
if all files were successfully deleted,false
otherwise.functions.php : 1073
Write data to a file
writeFile(string $file, string $data) : bool
$file : string
The file path to write to
$data : string
The data to write to the file
bool —
True on success, false on failure
functions.php : 1091
This function has been used to return unique number.
uc_unique(int $ctime[, int $base = 36 ][, bool $is_rand = true ][, int $size = 8 ]) : string
Generates a unique ID based on the current time and optionally a random number.
$ctime : int
The current time as a Unix timestamp. If not provided or 0, the current time will be used.
$base : int = 36
The numeric base to use for the encoding. Defaults to 36.
$is_rand : bool = true
Whether to include a random number in the unique ID. Defaults to true.
$size : int = 8
The desired size of the unique ID. Defaults to 8.
string —
The generated unique ID.
functions.php : 1116
Encodes an integer using base 64 and returns a string of a specified size.
GUID64_encode(int $i[, int $size = 2 ]) : string
$i : int
The integer to encode.
$size : int = 2
The desired size of the resulting string. Default is 2.
string —
The base 64 encoded string.
functions.php : 1127
Decodes a base-64 encoded GUID string into a decimal number.
GUID64_decode(string $s) : int
$s : string
The base-64 encoded GUID string to decode.
int —
The decimal number representation of the GUID.
functions.php : 1143
This function has been used to reverse unique no.. Decode a unique string generated with uc_unique.
uc_unique_rev(string $string[, int $base = 36 ][, bool $is_rand = true ][, int $size = 8 ]) : mixed
$string : string
The unique string to decode.
$base : int = 36
The number base to use for decoding the string. Default is 36.
$is_rand : bool = true
Whether the unique string includes random characters. Default is true.
$size : int = 8
The number of characters in the unique string. Default is 8.
mixed —
Returns the decoded timestamp (and random characters, if applicable) as a string or integer.
functions.php : 1171
Converts a decimal number to a string representation in the given base.
dec2string(string $decimal, int $base[, bool $firstalpha = false ]) : string|false
$decimal : string
The decimal number to convert.
$base : int
The base to use for the string representation.
$firstalpha : bool = false
Whether to include the first alphabetical characters in the charset.
string|false —
The string representation of the decimal number in the given base, or false if an error occurred.
functions.php : 1218
Convert a string in a given base to a decimal number.
string2dec(string $string, int $base) : string|false
$string : string
The input string.
$base : int
The base of the input string.
string|false —
The decimal number as a string on success, false on failure.
functions.php : 1266
Returns the current Unix timestamp with microseconds
getMicroTime() : float
float —
The current Unix timestamp with microseconds
functions.php : 1279
Returns the current time in the specified time zone.
getTimeByTimezone([string $time_zone = 'Europe/London' ][, string $format = 'Y-m-d H:i:s' ]) : string
$time_zone : string = 'Europe/London'
The time zone to use, default is 'Europe/London'.
$format : string = 'Y-m-d H:i:s'
The date/time format to return, default is 'Y-m-d H:i:s'.
string —
The current time in the specified time zone, formatted according to the specified format.
functions.php : 1298
Sets the assessment date and time based on a specified timezone option.
setAssessmentDateTime(string $date, string $time, string $timezone_option) : string
$date : string
The date in the format 'Y-m-d'.
$time : string
The time in the format 'H:i' or 'H:i:s'.
$timezone_option : string
The timezone option to use, specified as a time offset or timezone string.
string —
The assessment date and time in the format 'Y-M-d H:i:s'.
functions.php : 1316
Get the end date based on the start date, end date or number of days.
getEndDate([string $start_date = '' ][, string $end_date = '' ][, bool|int $days = false ]) : string
$start_date : string = ''
The start date in string format ('Y-m-d').
$end_date : string = ''
The end date in string format ('Y-m-d').
$days : bool|int = false
The number of days to add to the start date.
string —
The end date in the format 'Y-m-d', or an empty string if no date is found.
functions.php : 1339
Check if the given date has already passed based on the given timezone.
isDatePassed(string $new_date[, string $time_zone = 'Europe/London' ]) : bool
$new_date : string
The date to be checked in string format ('Y-m-d H:i:s').
$time_zone : string = 'Europe/London'
The timezone identifier in which to check the date.
bool —
True if the given date has already passed, false otherwise or if an exception occurred.
functions.php : 1358
This is the function that has been used to join paths.
joinPaths() : string
string —
as whole response of function.
functions.php : 1386
Add a protocol to a URL if it does not already have one.
addProtocol(string $url[, string|false $protocol = false ]) : string
$url : string
The URL to add a protocol to.
$protocol : string|false = false
The protocol to add to the URL. If false, the function will attempt to determine the protocol automatically.
string —
The URL with the protocol added.
functions.php : 1408
Recursive version of print_r that returns the result as an associative array.
rprint_r(mixed $in) : array<string|int, mixed>
$in : mixed
The input variable to print.
array<string|int, mixed> —
The result as an associative array.
functions.php : 1459
Outputs the given variable for debugging purposes only if the server name is 'localhost'.
__ucd(mixed $a[, bool $isDie = 1 ][, bool $isPre = 1 ]) : void
It is print_r with
tags in it running on only local server *
$a : mixed
The variable to output.
$isDie : bool = 1
Whether to terminate the script after outputting the variable.
$isPre : bool = 1
Whether to wrap the output in a
tag for better readability.
void —
functions.php : 1480
Convert a string to an associative array
str2Assoc(string $str[, string $sep_1 = ',' ][, string $sep_2 = '|' ]) : array<string|int, mixed>
$str : string
The string to convert
$sep_1 : string = ','
The separator used to split the string into key-value pairs
$sep_2 : string = '|'
The separator used to split each key-value pair
array<string|int, mixed> —
The resulting associative array
functions.php : 1498
Check if a variable is set and not empty, and optionally compare it to a given value.
ucIsset(mixed $v[, mixed $val = false ]) : bool
$v : mixed
The variable to check.
$val : mixed = false
The value to compare $v to (optional).
bool —
Returns true if $v is set and not empty (and optionally equal to $val), false otherwise.
functions.php : 1515
This is the function that has been used to return haystack.
ucInStr(string $needle, string $str[, string $delimiter = ',' ]) : bool
Searches for the occurrence of a string within a comma-separated list of strings.
$needle : string
The string to search for.
$str : string
The comma-separated list of strings to search in.
$delimiter : string = ','
The delimiter used to separate the strings.
bool —
True if the string is found in the list, false otherwise.
functions.php : 1533
Create a table row from an array of data.
ucTblStr(mixed $arr[, bool $thead = false ][, bool $istr = false ]) : string
$arr : mixed
The data to be used to create the table row. Can be an array or a string.
$thead : bool = false
Whether the row is a table header row.
$istr : bool = false
Whether to wrap the row in tags.
string —
The HTML string representing the table row.
functions.php : 1577
This is the function that has been used to return array by uc items.
ucItemsByArray(array<string|int, mixed> $items, string $item) : array<string|int, mixed>
Returns an array of values from an array of associative arrays *
$items : array<string|int, mixed>
Array of associative arrays
$item : string
Key name to retrieve from each associative array
array<string|int, mixed> —
Array of values for the given key name
functions.php : 1595
Returns a string between two delimiters in a larger string.
get_string_between(string $string, string $start, string $end) : string
$string : string
The larger string to search in.
$start : string
The starting delimiter.
$end : string
The ending delimiter.
string —
The substring between the two delimiters.
functions.php : 1619
Return an associative array indexed by a specific item in a nested array.
ucArrayByItem(array<string|int, mixed> $arr, string $item[, string|false $val_str = false ]) : array<string|int, mixed>
$arr : array<string|int, mixed>
The array to traverse.
$item : string
The key to use as the index.
$val_str : string|false = false
A comma-separated list of values to include in the output.
array<string|int, mixed> —
An associative array indexed by the specified key.
functions.php : 1644
Convert a string to its hexadecimal representation.
strToHex(string $string) : string
$string : string
The input string to convert.
string —
The hexadecimal representation of the input string.
functions.php : 1664
Converts a hexadecimal string to its binary representation.
hex2bin(string $hex) : string
$hex : string
The hexadecimal string to convert.
string —
The binary representation of the input.
functions.php : 1678
Generates an authentication token using AES-256-CBC encryption.
generateAuthToken(string $string, string $secret_key) : string
$string : string
The string to encrypt and include in the token.
$secret_key : string
The secret key to use for encryption.
string —
The generated authentication token.
functions.php : 1697
Extracts a string from an encrypted token generated using generateAuthToken function.
extractAuthToken(string $encrypt_string, string $secret_key) : string|null
$encrypt_string : string
The encrypted token string to extract from.
$secret_key : string
The secret key used to encrypt the token.
string|null —
The decrypted string or null if the token is invalid.
functions.php : 1719
Merge two arrays, optionally recursively.
array_merge_uc(array<string|int, mixed> $arr1, array<string|int, mixed> $arr2[, bool|int $recursive = false ]) : array<string|int, mixed>
$arr1 : array<string|int, mixed>
The first array to merge
$arr2 : array<string|int, mixed>
The second array to merge
$recursive : bool|int = false
Whether to merge the arrays recursively
array<string|int, mixed> —
The merged array
functions.php : 1743
Returns all the keys or specific keys of an array, optionally filtered by value.
array_keys_uc(array<string|int, mixed> $arr[, mixed $value = false ]) : array<string|int, mixed>
$arr : array<string|int, mixed>
The input array.
$value : mixed = false
The value to filter keys by. If set, only keys with this value will be returned.
array<string|int, mixed> —
The array keys.
functions.php : 1762
Removes duplicate values from an array.
array_unique_uc(array<string|int, mixed> $arr) : array<string|int, mixed>
$arr : array<string|int, mixed>
The input array.
array<string|int, mixed> —
The array with duplicate values removed.
functions.php : 1776
Counts the number of elements in an array.
count_uc(array<string|int, mixed> $arr) : int
$arr : array<string|int, mixed>
The array to count elements in.
int —
The number of elements in the array.
functions.php : 1791
Returns a new array with the keys changed to the value of the specified key in the original array
array_change_key_uc(array<string|int, mixed> $arr, string $key) : array<string|int, mixed>
$arr : array<string|int, mixed>
The original array to be modified
$key : string
The key to use as the new array key
array<string|int, mixed> —
The new array with keys changed to the value of $key
functions.php : 1811
Sorts a multidimensional array by a specified key
multi_array_sort(array<string|int, mixed> &$data, string $key[, bool $reverse_sort = false ]) : mixed
$data : array<string|int, mixed>
The array to be sorted
$key : string
The key to sort by
$reverse_sort : bool = false
Whether to sort in reverse order
mixed —
functions.php : 1841
Obfuscates a given link by encoding it using base64 and rawurlencode.
obfuscate_link(string $temp) : string
$temp : string
The link to be obfuscated.
string —
The obfuscated link.
functions.php : 1854
Converts a number of seconds into a human-readable string
unobfuscate_link(string $link) : string
$link : string
denotes link.
string —
as overall response of the functions.
functions.php : 1869
This is the function that has been used to convert seconds to human.
seconds2human(string $seconds[, string $is_short = true ][, string $return_index = '' ]) : string
$seconds : string
denotes seconds.
$is_short : string = true
denotes is_short.
$return_index : string = ''
denotes return_index.
string —
as overall response of the functions.
functions.php : 1917
Returns a human-readable string representing the time elapsed since the provided timestamp
friendlyDate(int $time) : string
$time : int
Unix timestamp to calculate time elapsed from
string —
Human-readable string representing time elapsed
functions.php : 1954
Format a given ISBN number into a standard format with hyphens.
formatISBN(string $isbn) : string
$isbn : string
The ISBN number to format.
string —
The formatted ISBN number.
functions.php : 1975
Adds files from a directory to a ZIP archive.
addToArchive(string $filePath, string $output_archive[, string|false $output_zip_name = false ][, bool $download = false ][, bool $remove = true ]) : void
$filePath : string
The path of the directory containing the files to be added to the archive.
$output_archive : string
The path of the ZIP archive to create.
$output_zip_name : string|false = false
The name of the ZIP archive to be downloaded, or false to use the default name.
$download : bool = false
Whether to download the ZIP archive.
$remove : bool = true
Whether to remove the original files after adding them to the archive.
void —
functions.php : 2019
Returns the date after a specified number of days after a given date.
dateafter(string $date, int $daysafter) : string
$date : string
The date to start from in YYYY-MM-DD format.
$daysafter : int
The number of days after the starting date to return (default 0).
string —
The resulting date in YYYY-MM-DD format.
functions.php : 2031
Check if the given timezone observes Daylight Saving Time (DST).
timezoneDoesDST(string $tzId[, int|false $time_zone_offset = false ]) : bool|int
$tzId : string
The timezone identifier (e.g. "America/New_York").
$time_zone_offset : int|false = false
The timezone offset from GMT in hours.
bool|int —
Returns true if the timezone observes DST, false if not. If an error occurs, returns false.
functions.php : 2058
Calculates the time difference between two time values
get_time_difference(string $start_time, string $end_time[, string $format = '%H:%I:%S' ]) : string
$start_time : string
The starting time value
$end_time : string
The ending time value
$format : string = '%H:%I:%S'
The output format for the time difference, defaults to '%H:%I:%S'
string —
The time difference in the specified format.
functions.php : 2092
Convert a given time to UTC time
convertToUTC(int $time, array<string|int, mixed> $time_zone_dst[, int $time_zone = false ]) : int
$time : int
The time to be converted
$time_zone_dst : array<string|int, mixed>
An array of time zone DST information
$time_zone : int = false
The time zone offset in minutes
int —
The converted UTC time
functions.php : 2111
Generates an access token for a client with the given ID and email.
generateAccessToken(string $client_id, string $email[, string|false $suffix_str = false ][, int $key_type = 1 ]) : array<string|int, mixed>
$client_id : string
The client ID.
$email : string
The client email.
$suffix_str : string|false = false
An optional string to add as a suffix to the token.
$key_type : int = 1
The type of key to use for the token (default is 1).
array<string|int, mixed> —
An array containing the access token and status message.
functions.php : 2136
Verify the access token using JWT decode
verifyAccessToken(string $token) : string
$token : string
denotes token.
string —
as overall response of the functions.
functions.php : 2147
This is the function that has been used to refresh access token.
refreshAccessToken(mixed $old_token) : object|bool
$old_token : mixed
object|bool —
Returns the decoded token object on success or false on failure
functions.php : 2173
Converts a GUID to a more friendly format by replacing confusing characters.
friendlyguid(string $guid) : string
$guid : string
The GUID to convert.
string —
The converted GUID.
functions.php : 2198
Get the user's IP address.
getUserIP() : string
string —
User's IP address or "UNKNOWN" if unable to detect.
functions.php : 2224
This is the function that has been used to get columns of array.
array_column_uc(array<string|int, mixed> $array, string $column) : array<string|int, mixed>
Get an array of values from a specific column in a multi-dimensional array with uppercase column names.
$array : array<string|int, mixed>
The input array.
$column : string
The column to retrieve the values from.
array<string|int, mixed> —
The resulting array of values from the specified column.
functions.php : 2242
This is the function that has been used to get bin from IP.
bin2ip(string $bin) : string
Convert binary representation of IP address to string
$bin : string
Binary representation of IP address
string —
Returns string representation of IP address
functions.php : 2258
Removes whitespace characters from a string.
removeStrSpace([string $str = true ]) : string
$str : string = true
The input string to process.
string —
The input string with all whitespace characters removed.
functions.php : 2274
Validate a JSON string and return the decoded result.
json_validate(string $string[, string &$error = '' ]) : mixed
$string : string
The JSON string to validate.
$error : string = ''
A reference to a variable that will contain the error message if the JSON is invalid.
mixed —
The decoded JSON data if valid, or false if invalid.
functions.php : 2336
Resize an image and save it to the specified path.
resizeImage(string $imgObject, string $savePath, string $image_type, string $imgName, int $imgMaxWidth, int $imgMaxHeight, int $imgQuality) : void
$imgObject : string
The image file path.
$savePath : string
The path where the resized image will be saved.
$image_type : string
The type of the image, e.g. 'jpg', 'jpeg', 'png', etc.
$imgName : string
The name of the resized image file.
$imgMaxWidth : int
The maximum width of the resized image.
$imgMaxHeight : int
The maximum height of the resized image.
$imgQuality : int
The quality of the resized image, from 0 to 100.
void —
functions.php : 2373
Find the key from a string
uf_findkey(string $str, string &$key) : string
$str : string
The input string to find the key from
$key : string
The variable to store the found key
string —
The value found after the key
functions.php : 2392
Encode an array to UTF-8 encoded JSON string
utf8json(array<string|int, mixed> $inArray) : string
$inArray : array<string|int, mixed>
The array to encode
string —
The encoded JSON string
functions.php : 2444
Function to get contentGUIDs based on filters
getContentsGUIDs(mixed $coverage, mixed $seq2coverage[, mixed $content_type = 'q,u,f' ][, mixed $content_subtype = false ][, mixed $parent_guid = false ][, mixed $testnos = -1 ][, mixed $level = false ][, mixed $demo = -1 ][, mixed $visible = 1 ]) : mixed
$coverage : mixed
$seq2coverage : mixed
$content_type : mixed = 'q,u,f'
$content_subtype : mixed = false
$parent_guid : mixed = false
$testnos : mixed = -1
$level : mixed = false
$demo : mixed = -1
$visible : mixed = 1
returns
array list of GUIDS
mixed —
functions.php : 2642
Remove elements from an array based on keys present in another array.
getDisabledGuids(array<string|int, mixed> $config_setting, array<string|int, mixed> $coverage, array<string|int, mixed> $seq2coverage) : array<string|int, mixed>
$config_setting : array<string|int, mixed>
denotes config_setting.
$coverage : array<string|int, mixed>
is the coverage.
$seq2coverage : array<string|int, mixed>
is the seq2coverage.
array<string|int, mixed> —
as whole response of function.
functions.php : 2719
This function eliminate invisible guids from the question list
removeInvisible(array<string|int, mixed> $ques, array<string|int, mixed> $invisible[, bool $only_array = false ]) : array<string|int, mixed>
$ques : array<string|int, mixed>
is the ques.
$invisible : array<string|int, mixed>
is the invisible.
$only_array : bool = false
is the boolean.
array<string|int, mixed> —
as response of the function.
functions.php : 2746
Deletes a given content GUID from a coverage array.
delete_from_coverage(array<string|int, mixed> $coverage, string $content_guid) : array<string|int, mixed>
$coverage : array<string|int, mixed>
The coverage array to modify.
$content_guid : string
The content GUID to remove from the coverage.
array<string|int, mixed> —
The modified coverage array.
functions.php : 2777
Sets answer sequence for an array of answers.
setAnswerSeq(array<string|int, mixed> $answers, int &$total_answers, int &$correct_answers, int $ansSeqType) : array<string|int, mixed>
$answers : array<string|int, mixed>
The array of answers to set sequence for.
$total_answers : int
The total number of answers.
$correct_answers : int
The total number of correct answers.
$ansSeqType : int
The type of answer sequence to use.
array<string|int, mixed> —
The updated array of answers with sequence.
functions.php : 2820
Returns the answer sequence string based on the given parameters.
getAnswerSeqStr(string $seq, string $type[, string $flip = false ]) : array<string|int, mixed>
$seq : string
is the seq.
$type : string
is the type.
$flip : string = false
is the flip.
array<string|int, mixed> —
as response of the function.
functions.php : 3053
Get the default grade formula in a JSON-encoded string or as an array
get_grade_formula_default([bool $is_array = false ]) : string|array<string|int, mixed>
$is_array : bool = false
Flag to determine if the formula should be returned as an array
string|array<string|int, mixed> —
The default grade formula in a JSON-encoded string or as an array, based on the $is_array flag
functions.php : 3068
Returns the default grade scale as a JSON string or array.
get_grade_scale_default([bool $is_array = false ]) : string|array<string|int, mixed>
$is_array : bool = false
If true, returns the grade scale as an associative array. Default is false.
string|array<string|int, mixed> —
Returns the default grade scale as a JSON string or array, depending on the value of $is_array.
functions.php : 3081
It is the function that has been used to get default config detail.
get_course_config_default() : mixed
Returns the default course configuration*@return string The default course configuration in JSON format
mixed —
functions.php : 3093
Returns the default coverage for a course, in JSON format.
get_coverage_default([string $chapter_guid = '' ]) : string
$chapter_guid : string = ''
The GUID of the chapter to include in the coverage.
string —
The default coverage, in JSON format.
functions.php : 3121
Returns the name of a test based on its type and optional details.
getTestName(int $ttype[, string $detail = '' ][, bool $isShort = false ][, array<string|int, mixed> $testName = array() ]) : string
$ttype : int
The type of test.
$detail : string = ''
Optional details about the test.
$isShort : bool = false
Whether to return the short version of the test name.
$testName : array<string|int, mixed> = array()
Optional array of custom test names.
string —
The name of the test.
functions.php : 3179
Pads the given number with leading zeros until it reaches the given length.
zfill(string $n, int $a) : string
$n : string
The number to pad with leading zeros.
$a : int
The desired length of the resulting string.
string —
The padded string.
functions.php : 3192
Returns a value within a specific range, or a default value if not set
get_range(mixed $var, mixed $min, mixed $max, mixed $default) : mixed
$var : mixed
The value to check
$min : mixed
The minimum value of the range
$max : mixed
The maximum value of the range
$default : mixed
The default value to return if $var is not set
mixed —
The value within the specified range or the default value
functions.php : 3208
Returns a default value if the primary value is empty, else returns the primary value.
get_default(mixed $primary_value, mixed $default_value, mixed $second_value) : mixed
$primary_value : mixed
The primary value to be checked for empty.
$default_value : mixed
The default value to be returned if primary value is empty.
$second_value : mixed
An optional secondary value to be used if primary value is empty.
mixed —
The primary value if not empty, otherwise returns the default value or the secondary value.
functions.php : 3226
Replaces constants in a string with their corresponding values.
replaceconst(string $ls_online[, bool $nolinebreak = false ]) : string
$ls_online : string
The string to search and replace.
$nolinebreak : bool = false
Optional. If true, removes line breaks from the string.
string —
The string with constants replaced by their corresponding values.
functions.php : 3251
Replaces images in a string with secure URLs, if necessary.
replaceimage(string $str) : string
$str : string
The string to replace images in.
string —
The string with replaced images.
functions.php : 3278
Replace line break tags and syntax tags with proper
tags for syntax highlighting
replacelinebreak(string $str[, string $nolinebreak = false ]) : string
$str : string
is the str.
$nolinebreak : string = false
is the nolinebreak.
string —
as response of the function.
functions.php : 3361
Converts a byte to an array of bits, using a given default array as a template.
byte2array(int $byte, array<string|int, mixed> $defarray[, int $len = 1 ]) : array<string|int, mixed>
$byte : int
The byte to convert.
$defarray : array<string|int, mixed>
The default array to use as a template.
$len : int = 1
The length of the byte in bytes (default: 1).
array<string|int, mixed> —
The resulting array of bits.
functions.php : 3379
arrayFilterBasedOnKey(mixed $convert_array, mixed $target_array[, mixed $seprator = ', ' ]) : mixed
$convert_array : mixed
$target_array : mixed
$seprator : mixed = ', '
mixed —
functions.php : 3403
This function is used to convert array into byte.
array2byte(string $option, array<string|int, mixed> $defarray[, string $len = 1 ]) : string
$option : string
is the option.
$defarray : array<string|int, mixed>
is the defarray.
$len : string = 1
is the len.
string —
as response of the function.
functions.php : 3431
This function is used to get ddl data.
get_ddl_data_uc(array<string|int, mixed> $array, string $idcolumn, string $datacolumn[, string $ddl = 1 ]) : array<string|int, mixed>
$array : array<string|int, mixed>
is the array.
$idcolumn : string
is the idcolumn.
$datacolumn : string
is the datacolumn.
$ddl : string = 1
is the ddl.
array<string|int, mixed> —
as response of the function.
functions.php : 3460
Get FlashCard content subtypes.
getFlashCardContentSubtypes([bool $ret_array = false ]) : mixed
$ret_array : bool = false
Whether to return an array or a comma-separated string.
mixed —
An array or a comma-separated string of content subtypes.
functions.php : 3477
This function is used to extract array.
extractArray(array<string|int, mixed> $arr[, string $indexes = '' ][, bool $ignore_blank = false ]) : array<string|int, mixed>
$arr : array<string|int, mixed>
The input array
$indexes : string = ''
A comma-separated list of indexes to extract
$ignore_blank : bool = false
Whether to ignore blank values or not
array<string|int, mixed> —
The resulting array with extracted values
functions.php : 3502
This function is used to unset array data.
unsetArrayData(array<string|int, mixed> $arr, string $indexes) : array<string|int, mixed>
$arr : array<string|int, mixed>
The input array
$indexes : string
A comma-separated list of indexes to be unset
array<string|int, mixed> —
The input array with specified indexes unset
functions.php : 3520
Returns the file extension of a given filename
findexts(string $filename) : string|void
$filename : string
The filename to extract extension from
string|void —
The file extension, or void if the input is empty or invalid
functions.php : 3538
Get the file extension and name from a file path.
get_file_extension(string $file_name) : array<string|int, mixed>
$file_name : string
The file path.
array<string|int, mixed> —
An array containing the file extension and name.
functions.php : 3562
A function to Get Sequence List of Guid.
getSeqList(string $guid, array<string|int, mixed> $coverage, array<string|int, mixed> $seq2coverage) : array<string|int, mixed>
Initialises variable $start_slide with $coverage guid[s] and $slide_level with $coverage guid[l] plus 1. Takes a loop for seq2coverage and checks if seq is greater than $start_slide and $coverage guid[l] is equal to $slide_level then checks $coverage guid[t] equal to s then assigns guid value to pslide. Else checks if $coverage guid[t] value is equal to f and $content guid[content_subtype] is greater than or equal to 9 or equal to 45 assigns guid value to pslide and lastly checks for value equal to u and and then return $pslide.
Get sequence list based on coverage and seq2coverage array
$guid : string
The guid of the starting slide
$coverage : array<string|int, mixed>
An array containing information about the coverage of each slide
$seq2coverage : array<string|int, mixed>
An array mapping sequences to slide guids
array<string|int, mixed> —
An array of slide guids
functions.php : 3593
This function is used to get order type.
getOrderType() : array<string|int, mixed>
array<string|int, mixed> —
as overall response of the function.
functions.php : 3626
Calculate the net price and discount information based on the given data.
calcPrice(array<string|int, mixed> $data) : array<string|int, mixed>
$data : array<string|int, mixed>
is the input array.
array<string|int, mixed> —
as overall response of the function.
functions.php : 3662
Extracts license information from an array of licenses.
extractLicence(array<string|int, mixed>|string $licences[, bool $is_byte = true ][, bool $full = false ]) : array<string|int, mixed>|string
$licences : array<string|int, mixed>|string
The array of licenses or license string to extract from.
$is_byte : bool = true
Whether the license is in byte format or not.
$full : bool = false
Whether to return the full license information.
array<string|int, mixed>|string —
The extracted license information.
functions.php : 3693
Searches for a string between two other strings in a given string
findtextnew_withouttrim(string $str, string $fstr, string $lstr, int &$i) : string|false
$str : string
The string to search in
$fstr : string
The starting string
$lstr : string
The ending string
$i : int
The index of the starting position of the found string
string|false —
The string between the starting and ending strings, or false if not found
functions.php : 3733
This function is used to find content image.
findContentImage(string $str[, string $maxloop = 15 ][, string $all = true ][, string $xml = false ][, string $is_find_alt = false ]) : array<string|int, mixed>
$str : string
is the str.
$maxloop : string = 15
is the maxloop.
$all : string = true
is the all.
$xml : string = false
is the xml.
$is_find_alt : string = false
is the is_find_alt.
array<string|int, mixed> —
as overall response of the function.
functions.php : 3978
It is the function that has been used to detect assets.
findAssets(array<string|int, mixed> $str[, array<string|int, mixed> $maxloop = 15 ]) : array<string|int, mixed>
$str : array<string|int, mixed>
denotes str.
$maxloop : array<string|int, mixed> = 15
is the maxloop.
array<string|int, mixed> —
as whole response of function.
functions.php : 4135
Extracts GUIDs from tags in the given string.
findSpanGuids(string $str) : array<string|int, mixed>
$str : string
The string to search for tags.
array<string|int, mixed> —
An array of GUIDs found in the tags.
functions.php : 4159
Find all device images in a string.
findDevices(string $str) : array<string|int, mixed>
$str : string
The input string to search.
array<string|int, mixed> —
An array of device images found in the input string.
functions.php : 4183
Convert test session options from integer to an associative array.
api_convert_test_session_options2array(int $opt) : array<string|int, mixed>
$opt : int
The integer value of the options.
array<string|int, mixed> —
An associative array of the test session options.
functions.php : 4214
Convert test session options array to binary format.
api_convert_test_session_array2options(array<string|int, mixed> $ary) : int
$ary : array<string|int, mixed>
An associative array of options to be converted.
int —
The converted binary format of the options.
functions.php : 4258
Convert an assignment schedule options integer to an associative array.
api_convert_assignment_schedule_options2array(int $opt) : array<string|int, mixed>
$opt : int
The assignment schedule options integer.
array<string|int, mixed> —
The assignment schedule options as an associative array.
functions.php : 4280
It is the function that has been used to convert test session array into options.
api_convert_assignment_schedule_array2options(array<string|int, mixed> $ary) : array<string|int, mixed>
$ary : array<string|int, mixed>
denotes ary.
array<string|int, mixed> —
as whole response of function.
functions.php : 4335
A function for score to grade.
score2grade(string $grade_scale, string $score[, string $grade_type = '' ]) : string
$grade_scale : string
It contains a string of grade.
$score : string
It contains a string for.
$grade_type : string = ''
It contains a string for type of grade.
string —
is the response of the function.
functions.php : 4362
Converts a set of results to grades based on a given grade scale.
result2grade(array<string|int, mixed> $grade_scale, array<string|int, mixed> $results) : array<string|int, mixed>
$grade_scale : array<string|int, mixed>
The grade scale to use for converting scores to grades.
$results : array<string|int, mixed>
The set of results to be graded.
array<string|int, mixed> —
An array of grades, one for each result in the set.
functions.php : 4397
Returns the current operating system from the server.
getCurrentOSFromServer() : string
string —
The name of the operating system.
functions.php : 4449
Encode the given data as JSON with support for encoding Unicode characters
json_encode_uc(mixed $data, int $options[, int $depth = 512 ]) : string|false
$data : mixed
The data to be encoded
$options : int
[optional] Bitmask of JSON encoding options
$depth : int = 512
[optional] Maximum depth to traverse when encoding
string|false —
A JSON encoded string on success, false on failure
functions.php : 4467
Decodes a JSON string and returns the resulting value.
json_decode_uc(string $string[, bool $assoc = false ][, int $depth = 512 ], int $options) : mixed
$string : string
The JSON string to decode.
$assoc : bool = false
Optional. When true, returned objects will be converted into associative arrays.
$depth : int = 512
Optional. User specified recursion depth.
$options : int
Optional. Bitmask of JSON decode options.
mixed —
The value encoded in JSON or false on failure.
functions.php : 4489
Generate a random number within a given range.
rand_uc([int|false $min = false ][, int|false $max = false ]) : int
$min : int|false = false
The minimum value of the range (default: 0).
$max : int|false = false
The maximum value of the range (default: getrandmax()).
int —
The random number generated within the given range.
functions.php : 4507
A function for to strip tags.
strip_all_tags_uc(string $string) : string
$string : string
is the string.
string —
as response of the function.
functions.php : 4521
Read entire contents of a file into a string
file_get_contents_uc(string $file_name[, bool $include_path = false ][, resource|null $context = null ], int $start) : string|false
$file_name : string
Name of the file to read
$include_path : bool = false
Optional. Search for the file in the include_path. Default is false.
$context : resource|null = null
Optional. A valid context resource created with stream_context_create(). Default is null.
$start : int
Optional. The position in bytes to start reading. Default is 0.
string|false —
Returns the read data or false on failure.
functions.php : 4541
A function for to get debug trace.
debug_backtrace_uc([string $options = DEBUG_BACKTRACE_PROVIDE_OBJECT ], string $limit) : array<string|int, mixed>
$options : string = DEBUG_BACKTRACE_PROVIDE_OBJECT
is the options.
$limit : string
is the limit.
array<string|int, mixed> —
as response of the function.
functions.php : 4598
Sanitizes a title, replacing whitespace and a few other characters with dashes. * Limits the output to alphanumeric characters, underscore (_) and dash (-).
sanitize_title_with_dashes_uc(string $title) : string
Whitespace becomes a dash.
$title : string
The title to be sanitized.
since
1.2.0
string —
The sanitized title.
functions.php : 4678
Retrieve the contents of a URL using cURL.
file_get_contents_curl(string $url) : string
$url : string
The URL to retrieve.
string —
The contents of the URL, or false if the request fails.
functions.php : 4701
Generates a Redis key using a given string value and prefix.
create_redis_key(string $val[, string $prefix = 'p:' ]) : string
$val : string
is the val.
$prefix : string = 'p:'
is the prefix.
string —
as response of the function.
functions.php : 4712
Retrieve the MAC address of the current system.
get_sys_mac_address() : string|null
string|null —
The MAC address if it can be found, otherwise null.
functions.php : 4742
Merge arrays while preserving keys.
array_merge_preserve(array<string|int, mixed> ...$arrays) : array<string|int, mixed>
$arrays : array<string|int, mixed>
Variable-length array of arrays to be merged.
array<string|int, mixed> —
Merged array.
functions.php : 4762
This is the function that has been used to debug and print data in jigyaasa.
__ucc(array<string|int, mixed> $a[, array<string|int, mixed> $isDie = 1 ][, array<string|int, mixed> $isPre = 1 ]) : mixed
$a : array<string|int, mixed>
denotes a.
$isDie : array<string|int, mixed> = 1
denotes isDie.
$isPre : array<string|int, mixed> = 1
denotes isPre.
mixed —
functions.php : 4780
Generates a new random password.
generateNewPassword() : string
string —
A new password string.
functions.php : 4799
Returns the LMS platform ID based on the given URL.
getLMSPlatformIDFromURL(string $url) : string
$url : string
The URL to check.
string —
The LMS platform ID or 'unknown' if not found.
index.php : 101
kelvinToCelsius(float $kelvin) : mixed
$kelvin : float
mixed —
cssVars({});