Zend Guard Loader - PHP API

This topic lists the PHP API functions of the Zend Guard Loader.

Zend Guard Loader Functions

Function

Description

zend_loader_enabled

Checks the Zend Optimizer+ configuration to verify that it is configured to load encoded files

zend_loader_file_encoded

Returns TRUE if the current file was encoded with Zend Guard or FALSE otherwise. If FALSE, consider disabling the Guard Loader

zend_loader_file_licensed

Compares the signature of the running file against the signatures of the license files that are loaded into the License Registry by the php.ini file. If a valid license file exists, the values of the license file are read into an array. If a valid license does not exist or is not specified in the php.ini, it is not entered in the PHP server's license registry. If a valid license that matches the product and signature cannot be found in the license directory, an array is not created. For information on the proper installation of a license file, as well as the php.ini directive, see the Zend Guard User Guide

zend_loader_current_file

Obtains the full path to the file that is currently running. In other words, the path of the file calling this API function is evaluated only at run time and not during encoding

zend_loader_install_license

Dynamically loads a license for applications encoded with Zend Guard.

zend_obfuscate_function_name

Obfuscate and return the given function name with the internal obfuscation function

zend_current_obfuscation_level

Returns the current obfuscation level support (set by zend_optimizer.obfuscation_level_support) to get information on the product that is currently running.

zend_runtime_obfuscate

Start runtime-obfuscation support to allow limited mixing of obfuscated and un-obfuscated code

zend_obfuscate_class_name

Obfuscate and return the given class name with the internal obfuscation function

zend_get_id

Returns an array of Zend (host) IDs in your system. If all_ids is TRUE, then all IDs are returned, otherwise only IDs considered "primary" are returned

zend_loader_version

Returns Zend Guard Loader version

zend_loader_enabled

Checks the Zend Optimizer+ configuration to verify that it is configured to load encoded files

Available Since Version: 4.0

Return Value: boolean - Returns TRUE if the Guard Loader is configured to load encoded files. Returns FALSE if the Guard Loader is not configured to load encoded files.

zend_loader_file_encoded

Returns TRUE if the current file was encoded with Zend Guard or FALSE otherwise. If FALSE, consider disabling the Guard Loader

Available Since Version: 4.0

Return Value: boolean - TRUE if Zend-encoded, FALSE otherwise

zend_loader_file_licensed

Compares the signature of the running file against the signatures of the license files that are loaded into the License Registry by the php.ini file. If a valid license file exists, the values of the license file are read into an array. If a valid license does not exist or is not specified in the php.ini, it is not entered in the PHP server's license registry. If a valid license that matches the product and signature cannot be found in the license directory, an array is not created. For information on the proper installation of a license file, as well as the php.ini directive, see the Zend Guard User Guide

Available Since Version: 4.0

Return Value: array - Returns an array or FALSE.
If an array is returned, a valid license for the product exists in the location indicated in the php.ini file.

zend_loader_current_file

Obtains the full path to the file that is currently running. In other words, the path of the file calling this API function is evaluated only at run time and not during encoding

Available Since Version: 4.0

Return Value: string - Returns a string containing the full path of the file that is currently running

zend_loader_install_license

Dynamically loads a license for applications encoded with Zend Guard.

Available Since Version: 4.0

Parameter

Type

Required

Description

license_file

string

Yes

Name of the license file

overwrite

boolean

No

Controls if the function overwrites old licenses for the same product
0=Do not overwrite
1=Overwrite

Return Value: boolean - TRUE if the license was loaded successfully, FALSE otherwise

zend_obfuscate_function_name

Obfuscate and return the given function name with the internal obfuscation function

Available Since Version: 4.0

Parameter

Type

Required

Description

function_name

string

Yes

Name of the function to obfuscate

Return Value: string - Returns the obfuscated form of the given string.

zend_current_obfuscation_level

Returns the current obfuscation level support (set by zend_optimizer.obfuscation_level_support) to get information on the product that is currently running.

Available Since Version: 4.0

Return Value: int - Current obfuscation level

zend_runtime_obfuscate

Start runtime-obfuscation support to allow limited mixing of obfuscated and un-obfuscated code

Available Since Version: 4.0

Return Value: boolean - TRUE if succeeds, FALSE otherwise

zend_obfuscate_class_name

Obfuscate and return the given class name with the internal obfuscation function

Available Since Version: 4.0

Parameter

Type

Required

Description

class_name

string

Yes

Name of the class to obfuscate

Return Value: string - Returns the obfuscated form of the given string

zend_get_id

Returns an array of Zend (host) IDs in your system. If all_ids is TRUE, then all IDs are returned, otherwise only IDs considered "primary" are returned

Available Since Version: 4.0

Parameter

Type

Required

Description

all_ids

boolean

No

If all_ids is TRUE, returns all IDs, otherwise returns only IDs that are considered "primary"

Return Value: array - Array of host IDs

zend_loader_version

Returns Zend Guard Loader version

Available Since Version: 4.0

Return Value: string - Zend Guard Loader version