Lines Matching refs:function_name
197 $function_name = $matches[1];
223 $this->functions[ $function_name ] = array( 'args' => $args, 'func' => $stack );
338 $function_name = $matches[1];
343 $output[] = array( 'function_name' => $function_name, 'arg_count' => $arg_count );
345 if ( in_array( $function_name, $this->builtin_functions, true ) ) {
351 } elseif ( array_key_exists( $function_name, $this->calc_functions ) ) {
353 $counts = $this->calc_functions[ $function_name ];
357 …$error_data = array( 'expected' => implode( '/', $this->calc_functions[ $function_name ] ), 'given…
360 } elseif ( array_key_exists( $function_name, $this->functions ) ) {
362 if ( count( $this->functions[ $function_name ]['args'] ) !== $arg_count ) {
363 …$error_data = array( 'expected' => count( $this->functions[ $function_name ]['args'] ), 'given' =>…
434 $function_name = $matches[1];
435 if ( isset( $this->calc_functions[ $function_name ] ) ) {
437 $counts = $this->calc_functions[ $function_name ];
447 $output[] = array( 'function_name' => $function_name, 'arg_count' => 0 );
510 $function_name = $token['function_name'];
514 if ( in_array( $function_name, $this->builtin_functions, true ) ) {
520 $function_name = preg_replace( '/^arc/', 'a', $function_name );
522 if ( 'ln' === $function_name ) {
523 $function_name = 'log';
527 eval( '$stack->push( ' . $function_name . '( $op1 ) );' );
530 } elseif ( array_key_exists( $function_name, $this->calc_functions ) ) {
542 if ( 'if' === $function_name ) {
543 $function_name = 'func_if';
544 } elseif ( 'not' === $function_name ) {
545 $function_name = 'func_not';
546 } elseif ( 'and' === $function_name ) {
547 $function_name = 'func_and';
548 } elseif ( 'or' === $function_name ) {
549 $function_name = 'func_or';
550 } elseif ( 'mean' === $function_name ) {
551 $function_name = 'average';
552 } elseif ( 'arctan2' === $function_name ) {
553 $function_name = 'atan2';
555 $result = EvalMath_Functions::$function_name( ...array_reverse( $args ) );
562 } elseif ( array_key_exists( $function_name, $this->functions ) ) {
565 for ( $i = count( $this->functions[ $function_name ]['args'] ) - 1; $i >= 0; $i-- ) {
570 $args[ $this->functions[ $function_name ]['args'][ $i ] ] = $arg;
574 $stack->push( $this->pfx( $this->functions[ $function_name ]['func'], $args ) );