PHP code example of epiclesys / value-matcher

1. Go to this page and download the library: Download epiclesys/value-matcher library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

epiclesys / value-matcher example snippets


 
 
 iclesys\ValueMatcher\JsonMatcher; 
 
 $needle = '{ "key" : ["value"] }';
 $haystack = '
 {
    "level9": {
    "finalLevel": "reached",
    "stillGoing": true,
    "data" : { "key" : ["one", 2, "value"] }
    }
 }';
 
 JsonMatcher::contains($needle, $haystack); // true