Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 4, 2024 via composer

phpcollection/phpcollection 0.6.0

General-Purpose Collection Library for PHP
Package summary
Share
2
issues
1
high severity
license
1
1
low severity
license
1
2
licenses
1
Apache2
1
Apache-2.0
Package created
30 Nov 2012
Version published
21 Mar 2022
Maintainers
1
Total deps
2
Direct deps
1
License
Apache2

Issues

2

1 high severity issue

high
Recommendation: Validate that the package complies with your license policy
via: phpcollection/phpcollection@0.6.0
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: phpcollection/phpcollection@0.6.0
Collapse
Expand

Licenses

Apache2

Invalid
Not OSI Approved
1 Packages, Including:
phpcollection/phpcollection@0.6.0

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
1 Packages, Including:
phpoption/phpoption@1.9.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of phpcollection/phpcollection 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
phpoption/phpoption1.9.2-Apache-2.0
prod

Visualizations

Frequently Asked Questions

What does phpcollection/phpcollection do?

The PHP Collection is a general-purpose collection library for PHP, developed by Schmitt Johannes. It helps PHP developers to simplify and improve the manipulation of arrays and other data structures. This includes tasks such as filtering, sorting, and other operations usually performed on collections.

How do you use phpcollection/phpcollection?

To use the PHP Collection library, you must first install it with Composer, a tool for dependency management in PHP. Here is how you do it:

composer require phpcollection/phpcollection

Then, you can use it in your code. Here is a simple example where we will create a sequence:

use JMS\PhpCollection\Sequence;

$sequence = new Sequence(array(1, 2, 3, 4));

$result = $sequence
    ->filter(function ($num) {
        return $num % 2 == 0;
    })
    ->map(function ($num) {
        return $num * 2;
    });

foreach ($result as $num) {
    echo $num, "\n";
}

In this example, the code first initializes a sequence with the numbers from 1 to 4. Then, it filters out the odd numbers and doubles the remaining even numbers. At the end, it prints each number from the resulting sequence.

Where are the phpcollection/phpcollection docs?

The documentation for the PHP Collection library can be found at its official documentation page. There, you can learn more about its functions and how you can use them in your PHP projects. The page includes all the necessary information to understand how to perform different operations with collections in PHP. The documentation is divided into several sections for easy navigation and it includes sample codes that make learning easier and quicker.