SQL Like operator in PHP.
<?php
use function Qubus\Support\Helpers\php_like;
php_like(string $pattern, string $subject): bool;
$pattern (string) (required) Search term.
$subject (string) (required) The text to search for.
(bool) Will return true
if found, false
otherwise.
<?php
php_like('%uc%','Lucy'); //true
php_like('%cy', 'Lucy'); //true
php_like('lu%', 'Lucy'); //true
php_like('%lu', 'Lucy'); //false
php_like('cy%', 'Lucy'); //false
Last Updated on August 14, 2024 by Joshua