This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* DISCLAIMER: This is a benchmark, not a use case. Please forgive the rudimentary example below. | |
* | |
* The following demonstrates a relatively common implementation of overload emulation. | |
* | |
* The benchmark measures the overhead in counting the anonymous arguments | |
* and delegating the the respective function. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The typehint definition requires an implementation of ::evaluate. | |
* It accepts a reference to a value as an argument. | |
* From here an assertion can be performed, or the value can be modified. | |
* | |
* The visibility of the method and whether it is static or not may be irrelevant. | |
*/ | |
typehint Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Given a GearmanWorker and an instance of Job, run it | |
* | |
* @param \GearmanWorker $gearmanWorker Gearman Worker | |
* @param Object $objInstance Job instance | |
* @param array $jobs Array of jobs to subscribe | |
* @param integer $iterations Number of iterations | |
* |