PHP code example of oranfry / obex

1. Go to this page and download the library: Download oranfry/obex 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/ */

    

oranfry / obex example snippets


use obex\Obex;

from([
    (object) [
        'name' => 'Misty',
        'nickname' => 'Moo',
        'likes' => (object) ['favourite' => 'Beef', 'other' => ['Venison']],
    ],
    (object) [
        'name' => 'Amber',
        'nickname' => 'Liu',
        'likes' => (object) ['favourite' => 'Veal', 'other' => ['Turkey']],
    ],
]);

echo $cats
    ->find('name', 'is', 'Amber')
    ->nickname; // Liu

echo $cats
    ->filter('->likes->favourite', 'is', 'Beef')
    ->first()
    ->name; // Misty