Performance-wise, this gives a little boost in performance and also
it's more readable I think. But I could be wrong so please someone
let me know.
See: https://www.php.net/manual/en/function.call-user-func.php
Change-Id: I2f0a00408c29549a786b56792411f88998a5f003
// Defines must comply with ^define\s*([^\s=]*)\s*=\s?'\{\$([^\}]*)\}';
while ( !feof( $fp ) ) {
if ( $lineCallback ) {
- call_user_func( $lineCallback );
+ $lineCallback();
}
$line = trim( fgets( $fp, 1024 ) );
$sl = strlen( $line ) - 1;
$cmd = $this->replaceVars( $cmd );
if ( $inputCallback ) {
- call_user_func( $inputCallback, $cmd );
+ $inputCallback( $cmd );
}
$res = $this->doQuery( $cmd );
if ( $resultCallback ) {