<commit_before># extract_property() for PHP

This simple library provides an easy to extract a given property from an array of objects.

## Usage

```
array extract_property( array $objects [, mixed $key] [, mixed $index] )
```

Given an array of objects, `extract_property()` returns the values
from a single property of each object, identified by $key`.
Optionally, you may provide an `$index` to index the values in the returned
array by the values from the `$index` property of each object in the input array.

For example, using the following `$users` array, we tell `extract_property()` to
return an array of just the names, indexed by their record IDs.

``` php
<?php
$users = array();

$a = new stdClass;
$b = new stdClass;
$c = new stdClass;

$a->id = 1;
$a->name = 'John';
$a->surname = 'Doe';

$users[] = $a;

$b->id = 2;
$b->name = 'Jane';
$b->surname = 'Doe';

$users[] = $b;

$c->id = 3;<commit_msg>Fix typos in README.md<commit_after># extract_property() for PHP

This simple library provides an easy way to extract a given property from an array of objects.

## Usage

```
array extract_property( array $objects [, mixed $key] [, mixed $index] )
```

Given an array of objects, `extract_property()` returns the values
from a single property of each object, identified by `$key`.
Optionally, you may provide an `$index` to index the values in the returned
array by the values from the `$index` property of each object in the input array.

For example, using the following `$users` array, we tell `extract_property()` to
return an array of just the names, indexed by their record IDs.

``` php
<?php
$users = array();

$a = new stdClass;
$b = new stdClass;
$c = new stdClass;

$a->id = 1;
$a->name = 'John';
$a->surname = 'Doe';

$users[] = $a;

$b->id = 2;
$b->name = 'Jane';
$b->surname = 'Doe';

$users[] = $b;

$c->id = 3;
{'fraction_non_alphanumeric': 0.14021739130434782, 'fraction_numerical': 0.003260869565217391, 'mean_word_length': 4.26, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5656690', 'n_tokens_mistral': 630, 'n_tokens_neox': 596, 'n_words': 263}