PHP code example of rx / helpers

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

    

rx / helpers example snippets


Observable::of(Observable::fromArray([1, 2, 3, 4, 5]))
    ->filter(\Rx\is(Observable::class))
    ->mergeAll()
    ->filter(\Rx\notEqualTo(2))
    ->filter('rx\even')
    ->reduce('rx\add')
    ->map(\Rx\p('rx\mult', 3))
    ->map(\Rx\p('rx\sub', 2))
    ->map(\Rx\p('rx\concatLeft', 'total: '))
    ->compose(\Rx\echoFinally('Test '))
    ->subscribe(\Rx\echoObserver('Test '));


//Test Next value: total: 10
//Test Complete!
//Test Finally!