Create custom boolean checks with Twig Tests

Code
<?php

use Twig\Loader\ArrayLoader;
use 
Twig\Environment;
use 
Twig\TwigTest;

$test = new TwigTest('bigger_than_zero', static function(float $num) : bool {
    return 
$num;
});

$templates = [
    
'twigtest' => '{% if number is bigger_than_zero %}true{% else %}false{% endif %}<br>',
];
$loader = new ArrayLoader($templates);
$twig = new Environment($loader);
$twig->addTest($test);

echo 
$twig->render('twigtest', ['number' => 10]);
echo 
$twig->render('twigtest', ['number' => -5]);
Result
true
false
Used Versions
PHP 7.3, Zend 3.0, Symfony 4.3, Laravel 5.8, PHPUnit 8.0, Doctrine 2.10