Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contains Condition is Case-Sensitive #59

Open
princeryansy opened this issue Nov 8, 2020 · 2 comments
Open

Contains Condition is Case-Sensitive #59

princeryansy opened this issue Nov 8, 2020 · 2 comments

Comments

@princeryansy
Copy link

princeryansy commented Nov 8, 2020

Suggestion to convert strpos to stripos if possible. Thanks!

image

@tomkeysers
Copy link

+1 for me.

@dreamwerx
Copy link

We had the same issue - but simply extended the class - and made a macro.

``<?php

use Nahid\JsonQ\Jsonq;

class Json_Query extends Jsonq {

public function __construct($jsonFile = null) {
parent::__construct($jsonFile);
$this->macro('containsInsensitive', function($value, $comparable) {
return (stripos($value, $comparable) !== false);
});
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants