Description
bool pbms_is_blob_reference (
string $blob_ref
[,resource $pbms]
)
Checks the format of the BLOB reference and returns true if it looks like a valid reference.
This doesn't guarantee that the reference references a valid BLOB on the PBMS BLOB streaming server
only that the format of the BLOB reference is correct.
Parameters
- $blob_ref
- The BLOB reference to be checked.
- $pbms
- A valid PBMS connection resource. If $pbms is not specified, the last link opened by pbms_connect() is assumed. If no such link is found, it will try to create one as if pbms_connect() was called with no arguments. If by chance no connection is found or established, an E_WARNING level error is generated.
Return Values
Returns TRUE if the BLOB reference looks OK.
Returns FALSE if the BLOB reference is not valid.
Example
<?php
pbms_connect();
// Create a BLOB
$blob_ref = pbms_put_data("A tiny BLOB", NULL );
if (pbms_is_blob_reference($blob_ref))
printf("Yes \"%s\" is a blob reference as expected.\n", $blob_ref );
else
printf("OOPS! \"%s\" is NOT a blob reference as expected. There is a bug in the PBMS API. :(\n", $blob_ref );
if (pbms_is_blob_reference("BLOB"))
printf("OOPS! \"BLOB\" should not be a blob reference. There is a bug in the PBMS API. :(\n");
else
printf("No \"BLOB\" is not a BLOB reference.\n" );
pbms_close();
?>