diff options
Diffstat (limited to 'inc/lib/Twig/Node/Expression/Binary/Power.php')
| -rw-r--r-- | inc/lib/Twig/Node/Expression/Binary/Power.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/inc/lib/Twig/Node/Expression/Binary/Power.php b/inc/lib/Twig/Node/Expression/Binary/Power.php index b2c59040..d24777bd 100644 --- a/inc/lib/Twig/Node/Expression/Binary/Power.php +++ b/inc/lib/Twig/Node/Expression/Binary/Power.php @@ -3,20 +3,19 @@ /* * This file is part of Twig. * - * (c) 2010 Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ class Twig_Node_Expression_Binary_Power extends Twig_Node_Expression_Binary { - /** - * Compiles the node to PHP. - * - * @param Twig_Compiler A Twig_Compiler instance - */ public function compile(Twig_Compiler $compiler) { + if (PHP_VERSION_ID >= 50600) { + return parent::compile($compiler); + } + $compiler ->raw('pow(') ->subcompile($this->getNode('left')) @@ -31,3 +30,5 @@ class Twig_Node_Expression_Binary_Power extends Twig_Node_Expression_Binary return $compiler->raw('**'); } } + +class_alias('Twig_Node_Expression_Binary_Power', 'Twig\Node\Expression\Binary\PowerBinary', false); |
