php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #19002 like operator
Submitted: 2002-08-20 18:29 UTC Modified: 2002-08-20 18:31 UTC
From: cxw at seekthru dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.1.2 OS: any
Private report: No CVE-ID: None
 [2002-08-20 18:29 UTC] cxw at seekthru dot com
I think it would be a good feature to have the syntax like the following:

if ($var like "%abc"){

}

or as an operator:

if ($var ~ "abc%") {

}

This is similar to the like syntax in SQL.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-20 18:31 UTC] rasmus@php.net
Argh!  No inline regular expressions or magical operators please.  There are functions to do this, call them.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri Jun 12 02:00:01 2026 UTC