| ▲ | chrismarlow9 5 hours ago | |
I don't have time to put together a submission but I'm willing to bet you can use this: https://github.com/kjdev/php-ext-jq And replicate this command: jq -R ' [inputs | split(",") | {url: .[0], date: .[1] | split("T")[0]}] | group_by(.url) | map({ (.[0].url): ( map(.date) | group_by(.) | map({(.[0]): length}) | add ) }) | add ' < test-data.csv And it will be faster than anything you can do in native php Edit: I'm assuming none of the urls have a comma with this but it's more about offloading it through an extension, even if you custom built it | ||
| ▲ | Retr0id 5 hours ago | parent [-] | |
The rules exclude FFI etc. | ||