PHP Classes

PHP Benchmark DTO Transform: Check the performance of several PHP DTO packages

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 26 All time: 11,235 This week: 67Up
Version License PHP version Categories
php-dto-transform-be 1.0MIT/X Consortium ...7Data types, Performance and optimization, P...
Description 

Author

This package can check the performance of several PHP DTO packages.

It uses the PHPBench package to measure the performance of PHP DTOs (Data transfer objects) in tasks like creating a data transfer object from an array of property values.

The benchmark results consist mainly of each PHP DTO's time to perform the tested tasks and the memory usage.

The package tests several PHP DTO packages from different developers. Currently, it tries PHP DTO packages:

- Yzen and Yzen Cache

- YII Hydrator

- Spatie

- EventSaucePHP

- Symfony

- CuyZ

- Jane and Jane Cache

Innovation Award
PHP Programming Innovation award nominee
December 2023
Number 7
Data transfer objects (DTO) are objects that applications use to store values of classes representing fundamental entities that applications manipulate, such as products sold on an e-commerce site.

Eventually, applications will use those objects to retrieve and store their values in data containers such as SQL databases.

Many PHP packages provide classes to implement data transfer objects.

This package implements a benchmark that measures the performance of several PHP DTO packages in essential aspects like speed and memory usage.

This way, other developers can compare the different PHP DTO packages and choose one with better performance.

Manuel Lemos
Picture of Andrey Iatsenko
  Performance   Level  
Innovation award
Innovation award
Nominee: 7x

 

Documentation

1) https://github.com/yzen-dev/plain-to-class 2) https://github.com/spatie/data-transfer-object 3) https://github.com/EventSaucePHP/ObjectHydrator 4) https://github.com/janephp/automapper 5) https://github.com/CuyZ/Valinor 6) https://github.com/yiisoft/hydrator

LiteCheckBench:

<img width="1098" alt="image" src="https://github.com/yzen-dev/php-dto-transform-benchmark/assets/24630195/1d72122b-355a-4994-996f-e5b9e9a896fd">

FullCheckBench

<img width="1154" alt="image" src="https://github.com/yzen-dev/php-dto-transform-benchmark/assets/24630195/40c187bb-19c2-4726-be1e-6f373ecc88b3">


  Files folder image Files (58)  
File Role Description
Files folder imagetests (1 file, 2 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file phpbench.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:26
This week:0
All time:11,235
This week:67Up