for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Copyright © 2018 Thomas Klein, All rights reserved.
* See LICENSE bundled with this library for license details.
*/
declare(strict_types=1);
namespace LogicTree\Operator\Comparator;
* Class RegexpOperator
*
* The REGEXP:
* The output is "true" if $expr2 match the $expr1 regex mask.
final class RegexpOperator extends AbstractCompareTwo
{
public const CODE = 'regexp';
* {@inheritdoc}
public function executeComparison($expr1, $expr2): bool
return (bool) \preg_match($expr1, $expr2);
}