PHP Classes

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

Recommend this page to a friend!
  Info   View files Documentation   View files View files (58)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2023-12-10 (27 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 18 All time: 11,140 This week: 91Up
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
Nominee
Vote
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: 5x

 

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  
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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:18
This week:0
All time:11,140
This week:91Up