# Examples

Example #1 Vector

``` <?php\$vector = new \Ds\Vector();\$vector->push('a');\$vector->push('b', 'c');\$vector[] = 'd';print_r(\$vector);?> ```

The above example will output something similar to:

```Ds\Vector Object
(
 => a
 => b
 => c
 => d
)
```

Example #2 Map

``` <?php\$map = new \Ds\Map();\$map->put('a', 1);\$map->put('b', 2);\$map['c'] = 3;print_r(\$map);?> ```

The above example will output something similar to:

```Ds\Map Object
(
 => Ds\Pair Object
(
[key] => a
[value] => 1
)

 => Ds\Pair Object
(
[key] => b
[value] => 2
)

 => Ds\Pair Object
(
[key] => c
[value] => 3
)

)
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.51174474,"math_prob":0.99042827,"size":577,"snap":"2022-05-2022-21","text_gpt3_token_len":215,"char_repetition_ratio":0.15706806,"word_repetition_ratio":0.15841584,"special_character_ratio":0.4731369,"punctuation_ratio":0.16814159,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99949455,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-25T12:39:28Z\",\"WARC-Record-ID\":\"<urn:uuid:5a5a575c-c59f-499e-8cc8-b85421fcb2f6>\",\"Content-Length\":\"22405\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:dd599f8e-891d-41b8-9691-07f830e8602e>\",\"WARC-Concurrent-To\":\"<urn:uuid:150091a9-ce4f-4008-9cef-72579f4e1951>\",\"WARC-IP-Address\":\"185.85.0.29\",\"WARC-Target-URI\":\"https://www.php.net/manual/en/ds.examples.php\",\"WARC-Payload-Digest\":\"sha1:Q4S4TGIN62BIQD7BHJYO3AAGIYSOLABB\",\"WARC-Block-Digest\":\"sha1:WMIZCCAV4KBJ6NI3WIRFIMBR4SSTTIEZ\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662587158.57_warc_CC-MAIN-20220525120449-20220525150449-00678.warc.gz\"}"}