├── .gitignore ├── README.md ├── benchmarks ├── ArrayAccessVsUnpackVsDeconstruct.php ├── ArrayMapVsForeachBench.php ├── ArrayMergeVsArrayDestructuringBench.php ├── ArrayOneOfTwo.php ├── ArrayUniqueVsFlip.php ├── CallbackInvokeVsCallUserFunc.php ├── Cast.php ├── CountableMethodVsFunction.php ├── ExceptionVsSupportBench.php ├── HashBench.php ├── HashSimpleBench.php ├── IfBool.php ├── IssetVsArrayKeyExistBench.php ├── Lazy.php ├── Random.php ├── ReflectionBench.php ├── RegexBench.php ├── StringConcat.php ├── StringMb.php ├── StringOffset.php ├── StringableMethodVsCast.php ├── TypeHintFunction.php └── Variadic.php ├── bin └── run ├── composer.json ├── composer.lock ├── old ├── construct-vs-closur-bind │ ├── CacheItem.php │ ├── CacheItemNoConstruct.php │ └── Construct.php ├── php-bench-01.php ├── php-bench-02.php ├── php-bench-03.php ├── php-bench-04.php ├── php-bench-05.php ├── php-bench-06.php ├── php-bench-07.php ├── php-bench-08.php ├── result-bench-01.txt ├── result-bench-02.txt ├── result-bench-03.txt └── result-bench-04.txt ├── phpbench.json └── src ├── Processor.php ├── WithException.php └── WithSupport.php /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Personal PHP benchmarks 2 | 3 | ## Installation 4 | 5 | composer install 6 | 7 | ## Usage 8 | 9 | bin/run benchmarks/IssetVsArrayKeyExistBench.php 10 | # or 11 | bin/run IssetVsArrayKeyExistBench 12 | -------------------------------------------------------------------------------- /benchmarks/ArrayAccessVsUnpackVsDeconstruct.php: -------------------------------------------------------------------------------- 1 | array = []; 16 | for ($i = 0; $i < 1000; ++$i) { 17 | $this->array[] = ['foo', 'bar']; 18 | } 19 | } 20 | 21 | public function benchTraverseArrayUnpack() 22 | { 23 | foreach ($this->array as $values) { 24 | $this->callback(...$values); 25 | } 26 | } 27 | 28 | public function benchTraverseArrayAccess() 29 | { 30 | foreach ($this->array as $values) { 31 | $this->callback($values[0], $values[1]); 32 | } 33 | } 34 | 35 | public function benchTraverseArrayDeconstruct() 36 | { 37 | foreach ($this->array as [$foo, $bar]) { 38 | $this->callback($foo, $bar); 39 | } 40 | } 41 | 42 | private function callback(string $foo, string $bar): void 43 | { 44 | // noop 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /benchmarks/ArrayMapVsForeachBench.php: -------------------------------------------------------------------------------- 1 | array = array_fill(0, 1000, 'foo'); 15 | } 16 | 17 | public function benchArrayMap() 18 | { 19 | $baseHeader = 'base'; 20 | $delimiter = ','; 21 | 22 | return array_map(function ($language) use ($baseHeader, $delimiter) { 23 | return $baseHeader.$delimiter.$language; 24 | }, $this->array); 25 | } 26 | 27 | public function benchArrayMapWithoutUse() 28 | { 29 | return array_map(function ($language) { 30 | return 'base'.','.$language; 31 | }, $this->array); 32 | } 33 | 34 | public function benchArrayMapWithoutUseAndStringInterpolation() 35 | { 36 | return array_map(function ($language) { 37 | return "base,$language"; 38 | }, $this->array); 39 | } 40 | 41 | public function benchForeach() 42 | { 43 | $baseHeader = 'base'; 44 | $delimiter = ','; 45 | 46 | $ret = []; 47 | foreach ($this->array as $language) { 48 | $ret[] = $baseHeader.$delimiter.$language; 49 | } 50 | 51 | return $ret; 52 | } 53 | 54 | public function benchForeachWithStringInterpolation() 55 | { 56 | $baseHeader = 'base'; 57 | $delimiter = ','; 58 | 59 | $ret = []; 60 | foreach ($this->array as $language) { 61 | $ret[] = "$baseHeader$delimiter$language"; 62 | } 63 | 64 | return $ret; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /benchmarks/ArrayMergeVsArrayDestructuringBench.php: -------------------------------------------------------------------------------- 1 | array1 = range('a', 'd'); 19 | $this->array2 = range(0, 10); 20 | $this->array3 = range('e', 'p'); 21 | $this->array4 = range('q', "z"); 22 | $this->array5 = range(11, 20); 23 | } 24 | 25 | public function benchArrayMerge() 26 | { 27 | array_merge($this->array1, $this->array2); 28 | } 29 | 30 | public function benchArrayDestructuring() 31 | { 32 | [...$this->array1, ...$this->array2]; 33 | } 34 | 35 | public function benchArrayMergeWith5Args() 36 | { 37 | array_merge($this->array1, $this->array2, $this->array3, $this->array4, $this->array5); 38 | } 39 | 40 | public function benchArrayDestructuringWith5Args() 41 | { 42 | [...$this->array1, ...$this->array2, $this->array3, ...$this->array4, ...$this->array5]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /benchmarks/ArrayOneOfTwo.php: -------------------------------------------------------------------------------- 1 | array = [...range(1, 100_000)]; 15 | // $this->array = [0, 'a', 10, 'b', 10, 'c']; 16 | } 17 | 18 | public function benchWithForeach() 19 | { 20 | foreach ($this->array as $i => $value) { 21 | if ($i % 2 === 1) { 22 | continue; 23 | } 24 | 25 | if ($value <= 0) { 26 | throw new \RuntimeException('$value should be greater than 0'); 27 | } 28 | } 29 | } 30 | 31 | public function benchWithFor() 32 | { 33 | for ($i = 0, $c = count($this->array); $i < $c; $i = $i + 2) { 34 | if ($this->array[$i] <= 0) { 35 | throw new \RuntimeException('$value should be greater than 0'); 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /benchmarks/ArrayUniqueVsFlip.php: -------------------------------------------------------------------------------- 1 | array = []; 15 | for ($i = 0; $i < 1000; ++$i) { 16 | $this->array[] = random_int(0, 1000); 17 | } 18 | } 19 | 20 | public function benchArrayUnique() 21 | { 22 | array_unique($this->array); 23 | } 24 | 25 | public function benchArrayFlip() 26 | { 27 | array_keys(array_flip($this->array)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /benchmarks/CallbackInvokeVsCallUserFunc.php: -------------------------------------------------------------------------------- 1 | arguments = []; 16 | for ($i = 0; $i < 1000; ++$i) { 17 | $this->arguments[] = ['foo', 'bar']; 18 | } 19 | $this->callback = function ($foo, $bar) { 20 | // noop 21 | }; 22 | } 23 | 24 | public function benchCallUserFuncArray() 25 | { 26 | foreach ($this->arguments as $args) { 27 | \call_user_func_array($this->callback, $args); 28 | } 29 | } 30 | 31 | public function benchInvoke() 32 | { 33 | foreach ($this->arguments as $args) { 34 | ($this->callback)(...$args); 35 | } 36 | } 37 | 38 | public function benchCallUserFunc() 39 | { 40 | foreach ($this->arguments as $args) { 41 | \call_user_func($this->callback, ...$args); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /benchmarks/Cast.php: -------------------------------------------------------------------------------- 1 | nullData = null; 16 | $this->objData = new DateTime(); 17 | } 18 | 19 | public function benchWithNullAndCast() 20 | { 21 | if ($this->nullData) { 22 | } 23 | } 24 | 25 | public function benchWithNullAndSame() 26 | { 27 | if (null !== $this->nullData) { 28 | } 29 | } 30 | 31 | public function benchWithNullAndInstanceOf() 32 | { 33 | if ($this->nullData instanceof DateTime) { 34 | } 35 | } 36 | 37 | public function benchWithObjAndCast() 38 | { 39 | if ($this->objData) { 40 | } 41 | } 42 | 43 | public function benchWithObjAndSame() 44 | { 45 | if (null !== $this->objData) { 46 | } 47 | } 48 | 49 | public function benchWithObjAndInstanceOf() 50 | { 51 | if ($this->objData instanceof DateTime) { 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /benchmarks/CountableMethodVsFunction.php: -------------------------------------------------------------------------------- 1 | countable = new class() implements \Countable { 15 | public function count() 16 | { 17 | return 0; 18 | } 19 | }; 20 | } 21 | 22 | public function benchCountMethod() 23 | { 24 | $this->countable->count(); 25 | } 26 | 27 | public function benchCountFunction() 28 | { 29 | \count($this->countable); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /benchmarks/ExceptionVsSupportBench.php: -------------------------------------------------------------------------------- 1 | exceptionProcessor = new Processor('exception', $rand); 20 | $this->supportProcessor = new Processor('support', $rand); 21 | } 22 | 23 | public function benchException() 24 | { 25 | $this->exceptionProcessor->process(); 26 | } 27 | 28 | public function benchSupport() 29 | { 30 | $this->supportProcessor->process(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /benchmarks/HashBench.php: -------------------------------------------------------------------------------- 1 | string = str_repeat('X', 100); 15 | } 16 | 17 | /** 18 | * @ParamProviders({ 19 | * "provideAlgos", 20 | * }) 21 | */ 22 | public function benchAlgos($params): void 23 | { 24 | hash((string) $params['algo'], $this->string); 25 | } 26 | 27 | public function provideAlgos() 28 | { 29 | foreach (\hash_algos() as $algo) { 30 | if ($algo === 'md2') { // md2 is in a different performance category 31 | continue; 32 | } 33 | yield $algo => ['algo' => $algo]; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /benchmarks/HashSimpleBench.php: -------------------------------------------------------------------------------- 1 | true]; 18 | isset($a['yop']); 19 | } 20 | 21 | public function benchAkeKO() 22 | { 23 | $a = []; 24 | \array_key_exists('nope', $a) && null !== $a['nope']; 25 | } 26 | 27 | public function benchAkeOK() 28 | { 29 | $a = ['yop' => true]; 30 | \array_key_exists('yop', $a) && null !== $a['yop']; 31 | } 32 | 33 | public function benchNullCoalescingKO() 34 | { 35 | $a = []; 36 | $a['nope'] ?? null; 37 | } 38 | 39 | public function benchNullCoalescingOK() 40 | { 41 | $a = ['yop' => true]; 42 | $a['nope'] ?? null; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /benchmarks/Lazy.php: -------------------------------------------------------------------------------- 1 | deps = new Deps(); 16 | 17 | $this->reflector = new \ReflectionClass(MyClass::class); 18 | } 19 | 20 | public function benchDirect() 21 | { 22 | $direct = new MyClass($this->deps); 23 | $direct->deps; 24 | } 25 | 26 | public function benchLazy() 27 | { 28 | $lazy = $this->reflector->newLazyGhost(function ($entity) { 29 | $this->reflector->getProperty('deps')->setValue($entity, $this->deps); 30 | }); 31 | $lazy->deps; 32 | } 33 | } 34 | 35 | 36 | class Deps 37 | { 38 | public string $name = 'Hello'; 39 | } 40 | 41 | class MyClass 42 | { 43 | public function __construct( 44 | public Deps $deps 45 | ) { 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /benchmarks/Random.php: -------------------------------------------------------------------------------- 1 | cache[Foobar::class] ??= new ReflectionClass(Foobar::class); 19 | } 20 | } 21 | 22 | class Foobar 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /benchmarks/RegexBench.php: -------------------------------------------------------------------------------- 1 | stringable = new class() implements \Stringable { 16 | public function __toString() 17 | { 18 | return ''; 19 | } 20 | }; 21 | } 22 | 23 | public function benchToStringMethod() 24 | { 25 | $this->stringable->__toString(); 26 | } 27 | 28 | public function benchCast() 29 | { 30 | (string) ($this->stringable); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /benchmarks/TypeHintFunction.php: -------------------------------------------------------------------------------- 1 | =8.0.0" 380 | }, 381 | "type": "library", 382 | "extra": { 383 | "branch-alias": { 384 | "dev-master": "1.0.x-dev" 385 | } 386 | }, 387 | "autoload": { 388 | "psr-4": { 389 | "Psr\\Cache\\": "src/" 390 | } 391 | }, 392 | "notification-url": "https://packagist.org/downloads/", 393 | "license": [ 394 | "MIT" 395 | ], 396 | "authors": [ 397 | { 398 | "name": "PHP-FIG", 399 | "homepage": "https://www.php-fig.org/" 400 | } 401 | ], 402 | "description": "Common interface for caching libraries", 403 | "keywords": [ 404 | "cache", 405 | "psr", 406 | "psr-6" 407 | ], 408 | "support": { 409 | "source": "https://github.com/php-fig/cache/tree/3.0.0" 410 | }, 411 | "time": "2021-02-03T23:26:27+00:00" 412 | }, 413 | { 414 | "name": "psr/container", 415 | "version": "2.0.2", 416 | "source": { 417 | "type": "git", 418 | "url": "https://github.com/php-fig/container.git", 419 | "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" 420 | }, 421 | "dist": { 422 | "type": "zip", 423 | "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", 424 | "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", 425 | "shasum": "" 426 | }, 427 | "require": { 428 | "php": ">=7.4.0" 429 | }, 430 | "type": "library", 431 | "extra": { 432 | "branch-alias": { 433 | "dev-master": "2.0.x-dev" 434 | } 435 | }, 436 | "autoload": { 437 | "psr-4": { 438 | "Psr\\Container\\": "src/" 439 | } 440 | }, 441 | "notification-url": "https://packagist.org/downloads/", 442 | "license": [ 443 | "MIT" 444 | ], 445 | "authors": [ 446 | { 447 | "name": "PHP-FIG", 448 | "homepage": "https://www.php-fig.org/" 449 | } 450 | ], 451 | "description": "Common Container Interface (PHP FIG PSR-11)", 452 | "homepage": "https://github.com/php-fig/container", 453 | "keywords": [ 454 | "PSR-11", 455 | "container", 456 | "container-interface", 457 | "container-interop", 458 | "psr" 459 | ], 460 | "support": { 461 | "issues": "https://github.com/php-fig/container/issues", 462 | "source": "https://github.com/php-fig/container/tree/2.0.2" 463 | }, 464 | "time": "2021-11-05T16:47:00+00:00" 465 | }, 466 | { 467 | "name": "psr/log", 468 | "version": "3.0.2", 469 | "source": { 470 | "type": "git", 471 | "url": "https://github.com/php-fig/log.git", 472 | "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" 473 | }, 474 | "dist": { 475 | "type": "zip", 476 | "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", 477 | "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", 478 | "shasum": "" 479 | }, 480 | "require": { 481 | "php": ">=8.0.0" 482 | }, 483 | "type": "library", 484 | "extra": { 485 | "branch-alias": { 486 | "dev-master": "3.x-dev" 487 | } 488 | }, 489 | "autoload": { 490 | "psr-4": { 491 | "Psr\\Log\\": "src" 492 | } 493 | }, 494 | "notification-url": "https://packagist.org/downloads/", 495 | "license": [ 496 | "MIT" 497 | ], 498 | "authors": [ 499 | { 500 | "name": "PHP-FIG", 501 | "homepage": "https://www.php-fig.org/" 502 | } 503 | ], 504 | "description": "Common interface for logging libraries", 505 | "homepage": "https://github.com/php-fig/log", 506 | "keywords": [ 507 | "log", 508 | "psr", 509 | "psr-3" 510 | ], 511 | "support": { 512 | "source": "https://github.com/php-fig/log/tree/3.0.2" 513 | }, 514 | "time": "2024-09-11T13:17:53+00:00" 515 | }, 516 | { 517 | "name": "seld/jsonlint", 518 | "version": "1.11.0", 519 | "source": { 520 | "type": "git", 521 | "url": "https://github.com/Seldaek/jsonlint.git", 522 | "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2" 523 | }, 524 | "dist": { 525 | "type": "zip", 526 | "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/1748aaf847fc731cfad7725aec413ee46f0cc3a2", 527 | "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2", 528 | "shasum": "" 529 | }, 530 | "require": { 531 | "php": "^5.3 || ^7.0 || ^8.0" 532 | }, 533 | "require-dev": { 534 | "phpstan/phpstan": "^1.11", 535 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" 536 | }, 537 | "bin": [ 538 | "bin/jsonlint" 539 | ], 540 | "type": "library", 541 | "autoload": { 542 | "psr-4": { 543 | "Seld\\JsonLint\\": "src/Seld/JsonLint/" 544 | } 545 | }, 546 | "notification-url": "https://packagist.org/downloads/", 547 | "license": [ 548 | "MIT" 549 | ], 550 | "authors": [ 551 | { 552 | "name": "Jordi Boggiano", 553 | "email": "j.boggiano@seld.be", 554 | "homepage": "https://seld.be" 555 | } 556 | ], 557 | "description": "JSON Linter", 558 | "keywords": [ 559 | "json", 560 | "linter", 561 | "parser", 562 | "validator" 563 | ], 564 | "support": { 565 | "issues": "https://github.com/Seldaek/jsonlint/issues", 566 | "source": "https://github.com/Seldaek/jsonlint/tree/1.11.0" 567 | }, 568 | "funding": [ 569 | { 570 | "url": "https://github.com/Seldaek", 571 | "type": "github" 572 | }, 573 | { 574 | "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", 575 | "type": "tidelift" 576 | } 577 | ], 578 | "time": "2024-07-11T14:55:45+00:00" 579 | }, 580 | { 581 | "name": "symfony/console", 582 | "version": "v7.1.5", 583 | "source": { 584 | "type": "git", 585 | "url": "https://github.com/symfony/console.git", 586 | "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee" 587 | }, 588 | "dist": { 589 | "type": "zip", 590 | "url": "https://api.github.com/repos/symfony/console/zipball/0fa539d12b3ccf068a722bbbffa07ca7079af9ee", 591 | "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee", 592 | "shasum": "" 593 | }, 594 | "require": { 595 | "php": ">=8.2", 596 | "symfony/polyfill-mbstring": "~1.0", 597 | "symfony/service-contracts": "^2.5|^3", 598 | "symfony/string": "^6.4|^7.0" 599 | }, 600 | "conflict": { 601 | "symfony/dependency-injection": "<6.4", 602 | "symfony/dotenv": "<6.4", 603 | "symfony/event-dispatcher": "<6.4", 604 | "symfony/lock": "<6.4", 605 | "symfony/process": "<6.4" 606 | }, 607 | "provide": { 608 | "psr/log-implementation": "1.0|2.0|3.0" 609 | }, 610 | "require-dev": { 611 | "psr/log": "^1|^2|^3", 612 | "symfony/config": "^6.4|^7.0", 613 | "symfony/dependency-injection": "^6.4|^7.0", 614 | "symfony/event-dispatcher": "^6.4|^7.0", 615 | "symfony/http-foundation": "^6.4|^7.0", 616 | "symfony/http-kernel": "^6.4|^7.0", 617 | "symfony/lock": "^6.4|^7.0", 618 | "symfony/messenger": "^6.4|^7.0", 619 | "symfony/process": "^6.4|^7.0", 620 | "symfony/stopwatch": "^6.4|^7.0", 621 | "symfony/var-dumper": "^6.4|^7.0" 622 | }, 623 | "type": "library", 624 | "autoload": { 625 | "psr-4": { 626 | "Symfony\\Component\\Console\\": "" 627 | }, 628 | "exclude-from-classmap": [ 629 | "/Tests/" 630 | ] 631 | }, 632 | "notification-url": "https://packagist.org/downloads/", 633 | "license": [ 634 | "MIT" 635 | ], 636 | "authors": [ 637 | { 638 | "name": "Fabien Potencier", 639 | "email": "fabien@symfony.com" 640 | }, 641 | { 642 | "name": "Symfony Community", 643 | "homepage": "https://symfony.com/contributors" 644 | } 645 | ], 646 | "description": "Eases the creation of beautiful and testable command line interfaces", 647 | "homepage": "https://symfony.com", 648 | "keywords": [ 649 | "cli", 650 | "command-line", 651 | "console", 652 | "terminal" 653 | ], 654 | "support": { 655 | "source": "https://github.com/symfony/console/tree/v7.1.5" 656 | }, 657 | "funding": [ 658 | { 659 | "url": "https://symfony.com/sponsor", 660 | "type": "custom" 661 | }, 662 | { 663 | "url": "https://github.com/fabpot", 664 | "type": "github" 665 | }, 666 | { 667 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 668 | "type": "tidelift" 669 | } 670 | ], 671 | "time": "2024-09-20T08:28:38+00:00" 672 | }, 673 | { 674 | "name": "symfony/deprecation-contracts", 675 | "version": "v3.5.0", 676 | "source": { 677 | "type": "git", 678 | "url": "https://github.com/symfony/deprecation-contracts.git", 679 | "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" 680 | }, 681 | "dist": { 682 | "type": "zip", 683 | "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", 684 | "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", 685 | "shasum": "" 686 | }, 687 | "require": { 688 | "php": ">=8.1" 689 | }, 690 | "type": "library", 691 | "extra": { 692 | "branch-alias": { 693 | "dev-main": "3.5-dev" 694 | }, 695 | "thanks": { 696 | "name": "symfony/contracts", 697 | "url": "https://github.com/symfony/contracts" 698 | } 699 | }, 700 | "autoload": { 701 | "files": [ 702 | "function.php" 703 | ] 704 | }, 705 | "notification-url": "https://packagist.org/downloads/", 706 | "license": [ 707 | "MIT" 708 | ], 709 | "authors": [ 710 | { 711 | "name": "Nicolas Grekas", 712 | "email": "p@tchwork.com" 713 | }, 714 | { 715 | "name": "Symfony Community", 716 | "homepage": "https://symfony.com/contributors" 717 | } 718 | ], 719 | "description": "A generic function and convention to trigger deprecation notices", 720 | "homepage": "https://symfony.com", 721 | "support": { 722 | "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" 723 | }, 724 | "funding": [ 725 | { 726 | "url": "https://symfony.com/sponsor", 727 | "type": "custom" 728 | }, 729 | { 730 | "url": "https://github.com/fabpot", 731 | "type": "github" 732 | }, 733 | { 734 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 735 | "type": "tidelift" 736 | } 737 | ], 738 | "time": "2024-04-18T09:32:20+00:00" 739 | }, 740 | { 741 | "name": "symfony/filesystem", 742 | "version": "v7.1.5", 743 | "source": { 744 | "type": "git", 745 | "url": "https://github.com/symfony/filesystem.git", 746 | "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a" 747 | }, 748 | "dist": { 749 | "type": "zip", 750 | "url": "https://api.github.com/repos/symfony/filesystem/zipball/61fe0566189bf32e8cfee78335d8776f64a66f5a", 751 | "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a", 752 | "shasum": "" 753 | }, 754 | "require": { 755 | "php": ">=8.2", 756 | "symfony/polyfill-ctype": "~1.8", 757 | "symfony/polyfill-mbstring": "~1.8" 758 | }, 759 | "require-dev": { 760 | "symfony/process": "^6.4|^7.0" 761 | }, 762 | "type": "library", 763 | "autoload": { 764 | "psr-4": { 765 | "Symfony\\Component\\Filesystem\\": "" 766 | }, 767 | "exclude-from-classmap": [ 768 | "/Tests/" 769 | ] 770 | }, 771 | "notification-url": "https://packagist.org/downloads/", 772 | "license": [ 773 | "MIT" 774 | ], 775 | "authors": [ 776 | { 777 | "name": "Fabien Potencier", 778 | "email": "fabien@symfony.com" 779 | }, 780 | { 781 | "name": "Symfony Community", 782 | "homepage": "https://symfony.com/contributors" 783 | } 784 | ], 785 | "description": "Provides basic utilities for the filesystem", 786 | "homepage": "https://symfony.com", 787 | "support": { 788 | "source": "https://github.com/symfony/filesystem/tree/v7.1.5" 789 | }, 790 | "funding": [ 791 | { 792 | "url": "https://symfony.com/sponsor", 793 | "type": "custom" 794 | }, 795 | { 796 | "url": "https://github.com/fabpot", 797 | "type": "github" 798 | }, 799 | { 800 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 801 | "type": "tidelift" 802 | } 803 | ], 804 | "time": "2024-09-17T09:16:35+00:00" 805 | }, 806 | { 807 | "name": "symfony/finder", 808 | "version": "v7.1.4", 809 | "source": { 810 | "type": "git", 811 | "url": "https://github.com/symfony/finder.git", 812 | "reference": "d95bbf319f7d052082fb7af147e0f835a695e823" 813 | }, 814 | "dist": { 815 | "type": "zip", 816 | "url": "https://api.github.com/repos/symfony/finder/zipball/d95bbf319f7d052082fb7af147e0f835a695e823", 817 | "reference": "d95bbf319f7d052082fb7af147e0f835a695e823", 818 | "shasum": "" 819 | }, 820 | "require": { 821 | "php": ">=8.2" 822 | }, 823 | "require-dev": { 824 | "symfony/filesystem": "^6.4|^7.0" 825 | }, 826 | "type": "library", 827 | "autoload": { 828 | "psr-4": { 829 | "Symfony\\Component\\Finder\\": "" 830 | }, 831 | "exclude-from-classmap": [ 832 | "/Tests/" 833 | ] 834 | }, 835 | "notification-url": "https://packagist.org/downloads/", 836 | "license": [ 837 | "MIT" 838 | ], 839 | "authors": [ 840 | { 841 | "name": "Fabien Potencier", 842 | "email": "fabien@symfony.com" 843 | }, 844 | { 845 | "name": "Symfony Community", 846 | "homepage": "https://symfony.com/contributors" 847 | } 848 | ], 849 | "description": "Finds files and directories via an intuitive fluent interface", 850 | "homepage": "https://symfony.com", 851 | "support": { 852 | "source": "https://github.com/symfony/finder/tree/v7.1.4" 853 | }, 854 | "funding": [ 855 | { 856 | "url": "https://symfony.com/sponsor", 857 | "type": "custom" 858 | }, 859 | { 860 | "url": "https://github.com/fabpot", 861 | "type": "github" 862 | }, 863 | { 864 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 865 | "type": "tidelift" 866 | } 867 | ], 868 | "time": "2024-08-13T14:28:19+00:00" 869 | }, 870 | { 871 | "name": "symfony/options-resolver", 872 | "version": "v7.1.1", 873 | "source": { 874 | "type": "git", 875 | "url": "https://github.com/symfony/options-resolver.git", 876 | "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55" 877 | }, 878 | "dist": { 879 | "type": "zip", 880 | "url": "https://api.github.com/repos/symfony/options-resolver/zipball/47aa818121ed3950acd2b58d1d37d08a94f9bf55", 881 | "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55", 882 | "shasum": "" 883 | }, 884 | "require": { 885 | "php": ">=8.2", 886 | "symfony/deprecation-contracts": "^2.5|^3" 887 | }, 888 | "type": "library", 889 | "autoload": { 890 | "psr-4": { 891 | "Symfony\\Component\\OptionsResolver\\": "" 892 | }, 893 | "exclude-from-classmap": [ 894 | "/Tests/" 895 | ] 896 | }, 897 | "notification-url": "https://packagist.org/downloads/", 898 | "license": [ 899 | "MIT" 900 | ], 901 | "authors": [ 902 | { 903 | "name": "Fabien Potencier", 904 | "email": "fabien@symfony.com" 905 | }, 906 | { 907 | "name": "Symfony Community", 908 | "homepage": "https://symfony.com/contributors" 909 | } 910 | ], 911 | "description": "Provides an improved replacement for the array_replace PHP function", 912 | "homepage": "https://symfony.com", 913 | "keywords": [ 914 | "config", 915 | "configuration", 916 | "options" 917 | ], 918 | "support": { 919 | "source": "https://github.com/symfony/options-resolver/tree/v7.1.1" 920 | }, 921 | "funding": [ 922 | { 923 | "url": "https://symfony.com/sponsor", 924 | "type": "custom" 925 | }, 926 | { 927 | "url": "https://github.com/fabpot", 928 | "type": "github" 929 | }, 930 | { 931 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 932 | "type": "tidelift" 933 | } 934 | ], 935 | "time": "2024-05-31T14:57:53+00:00" 936 | }, 937 | { 938 | "name": "symfony/polyfill-ctype", 939 | "version": "v1.31.0", 940 | "source": { 941 | "type": "git", 942 | "url": "https://github.com/symfony/polyfill-ctype.git", 943 | "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" 944 | }, 945 | "dist": { 946 | "type": "zip", 947 | "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", 948 | "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", 949 | "shasum": "" 950 | }, 951 | "require": { 952 | "php": ">=7.2" 953 | }, 954 | "provide": { 955 | "ext-ctype": "*" 956 | }, 957 | "suggest": { 958 | "ext-ctype": "For best performance" 959 | }, 960 | "type": "library", 961 | "extra": { 962 | "thanks": { 963 | "name": "symfony/polyfill", 964 | "url": "https://github.com/symfony/polyfill" 965 | } 966 | }, 967 | "autoload": { 968 | "files": [ 969 | "bootstrap.php" 970 | ], 971 | "psr-4": { 972 | "Symfony\\Polyfill\\Ctype\\": "" 973 | } 974 | }, 975 | "notification-url": "https://packagist.org/downloads/", 976 | "license": [ 977 | "MIT" 978 | ], 979 | "authors": [ 980 | { 981 | "name": "Gert de Pagter", 982 | "email": "BackEndTea@gmail.com" 983 | }, 984 | { 985 | "name": "Symfony Community", 986 | "homepage": "https://symfony.com/contributors" 987 | } 988 | ], 989 | "description": "Symfony polyfill for ctype functions", 990 | "homepage": "https://symfony.com", 991 | "keywords": [ 992 | "compatibility", 993 | "ctype", 994 | "polyfill", 995 | "portable" 996 | ], 997 | "support": { 998 | "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" 999 | }, 1000 | "funding": [ 1001 | { 1002 | "url": "https://symfony.com/sponsor", 1003 | "type": "custom" 1004 | }, 1005 | { 1006 | "url": "https://github.com/fabpot", 1007 | "type": "github" 1008 | }, 1009 | { 1010 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1011 | "type": "tidelift" 1012 | } 1013 | ], 1014 | "time": "2024-09-09T11:45:10+00:00" 1015 | }, 1016 | { 1017 | "name": "symfony/polyfill-intl-grapheme", 1018 | "version": "v1.31.0", 1019 | "source": { 1020 | "type": "git", 1021 | "url": "https://github.com/symfony/polyfill-intl-grapheme.git", 1022 | "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" 1023 | }, 1024 | "dist": { 1025 | "type": "zip", 1026 | "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", 1027 | "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", 1028 | "shasum": "" 1029 | }, 1030 | "require": { 1031 | "php": ">=7.2" 1032 | }, 1033 | "suggest": { 1034 | "ext-intl": "For best performance" 1035 | }, 1036 | "type": "library", 1037 | "extra": { 1038 | "thanks": { 1039 | "name": "symfony/polyfill", 1040 | "url": "https://github.com/symfony/polyfill" 1041 | } 1042 | }, 1043 | "autoload": { 1044 | "files": [ 1045 | "bootstrap.php" 1046 | ], 1047 | "psr-4": { 1048 | "Symfony\\Polyfill\\Intl\\Grapheme\\": "" 1049 | } 1050 | }, 1051 | "notification-url": "https://packagist.org/downloads/", 1052 | "license": [ 1053 | "MIT" 1054 | ], 1055 | "authors": [ 1056 | { 1057 | "name": "Nicolas Grekas", 1058 | "email": "p@tchwork.com" 1059 | }, 1060 | { 1061 | "name": "Symfony Community", 1062 | "homepage": "https://symfony.com/contributors" 1063 | } 1064 | ], 1065 | "description": "Symfony polyfill for intl's grapheme_* functions", 1066 | "homepage": "https://symfony.com", 1067 | "keywords": [ 1068 | "compatibility", 1069 | "grapheme", 1070 | "intl", 1071 | "polyfill", 1072 | "portable", 1073 | "shim" 1074 | ], 1075 | "support": { 1076 | "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" 1077 | }, 1078 | "funding": [ 1079 | { 1080 | "url": "https://symfony.com/sponsor", 1081 | "type": "custom" 1082 | }, 1083 | { 1084 | "url": "https://github.com/fabpot", 1085 | "type": "github" 1086 | }, 1087 | { 1088 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1089 | "type": "tidelift" 1090 | } 1091 | ], 1092 | "time": "2024-09-09T11:45:10+00:00" 1093 | }, 1094 | { 1095 | "name": "symfony/polyfill-intl-normalizer", 1096 | "version": "v1.31.0", 1097 | "source": { 1098 | "type": "git", 1099 | "url": "https://github.com/symfony/polyfill-intl-normalizer.git", 1100 | "reference": "3833d7255cc303546435cb650316bff708a1c75c" 1101 | }, 1102 | "dist": { 1103 | "type": "zip", 1104 | "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", 1105 | "reference": "3833d7255cc303546435cb650316bff708a1c75c", 1106 | "shasum": "" 1107 | }, 1108 | "require": { 1109 | "php": ">=7.2" 1110 | }, 1111 | "suggest": { 1112 | "ext-intl": "For best performance" 1113 | }, 1114 | "type": "library", 1115 | "extra": { 1116 | "thanks": { 1117 | "name": "symfony/polyfill", 1118 | "url": "https://github.com/symfony/polyfill" 1119 | } 1120 | }, 1121 | "autoload": { 1122 | "files": [ 1123 | "bootstrap.php" 1124 | ], 1125 | "psr-4": { 1126 | "Symfony\\Polyfill\\Intl\\Normalizer\\": "" 1127 | }, 1128 | "classmap": [ 1129 | "Resources/stubs" 1130 | ] 1131 | }, 1132 | "notification-url": "https://packagist.org/downloads/", 1133 | "license": [ 1134 | "MIT" 1135 | ], 1136 | "authors": [ 1137 | { 1138 | "name": "Nicolas Grekas", 1139 | "email": "p@tchwork.com" 1140 | }, 1141 | { 1142 | "name": "Symfony Community", 1143 | "homepage": "https://symfony.com/contributors" 1144 | } 1145 | ], 1146 | "description": "Symfony polyfill for intl's Normalizer class and related functions", 1147 | "homepage": "https://symfony.com", 1148 | "keywords": [ 1149 | "compatibility", 1150 | "intl", 1151 | "normalizer", 1152 | "polyfill", 1153 | "portable", 1154 | "shim" 1155 | ], 1156 | "support": { 1157 | "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" 1158 | }, 1159 | "funding": [ 1160 | { 1161 | "url": "https://symfony.com/sponsor", 1162 | "type": "custom" 1163 | }, 1164 | { 1165 | "url": "https://github.com/fabpot", 1166 | "type": "github" 1167 | }, 1168 | { 1169 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1170 | "type": "tidelift" 1171 | } 1172 | ], 1173 | "time": "2024-09-09T11:45:10+00:00" 1174 | }, 1175 | { 1176 | "name": "symfony/polyfill-mbstring", 1177 | "version": "v1.31.0", 1178 | "source": { 1179 | "type": "git", 1180 | "url": "https://github.com/symfony/polyfill-mbstring.git", 1181 | "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" 1182 | }, 1183 | "dist": { 1184 | "type": "zip", 1185 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", 1186 | "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", 1187 | "shasum": "" 1188 | }, 1189 | "require": { 1190 | "php": ">=7.2" 1191 | }, 1192 | "provide": { 1193 | "ext-mbstring": "*" 1194 | }, 1195 | "suggest": { 1196 | "ext-mbstring": "For best performance" 1197 | }, 1198 | "type": "library", 1199 | "extra": { 1200 | "thanks": { 1201 | "name": "symfony/polyfill", 1202 | "url": "https://github.com/symfony/polyfill" 1203 | } 1204 | }, 1205 | "autoload": { 1206 | "files": [ 1207 | "bootstrap.php" 1208 | ], 1209 | "psr-4": { 1210 | "Symfony\\Polyfill\\Mbstring\\": "" 1211 | } 1212 | }, 1213 | "notification-url": "https://packagist.org/downloads/", 1214 | "license": [ 1215 | "MIT" 1216 | ], 1217 | "authors": [ 1218 | { 1219 | "name": "Nicolas Grekas", 1220 | "email": "p@tchwork.com" 1221 | }, 1222 | { 1223 | "name": "Symfony Community", 1224 | "homepage": "https://symfony.com/contributors" 1225 | } 1226 | ], 1227 | "description": "Symfony polyfill for the Mbstring extension", 1228 | "homepage": "https://symfony.com", 1229 | "keywords": [ 1230 | "compatibility", 1231 | "mbstring", 1232 | "polyfill", 1233 | "portable", 1234 | "shim" 1235 | ], 1236 | "support": { 1237 | "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" 1238 | }, 1239 | "funding": [ 1240 | { 1241 | "url": "https://symfony.com/sponsor", 1242 | "type": "custom" 1243 | }, 1244 | { 1245 | "url": "https://github.com/fabpot", 1246 | "type": "github" 1247 | }, 1248 | { 1249 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1250 | "type": "tidelift" 1251 | } 1252 | ], 1253 | "time": "2024-09-09T11:45:10+00:00" 1254 | }, 1255 | { 1256 | "name": "symfony/polyfill-php80", 1257 | "version": "v1.31.0", 1258 | "source": { 1259 | "type": "git", 1260 | "url": "https://github.com/symfony/polyfill-php80.git", 1261 | "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" 1262 | }, 1263 | "dist": { 1264 | "type": "zip", 1265 | "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", 1266 | "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", 1267 | "shasum": "" 1268 | }, 1269 | "require": { 1270 | "php": ">=7.2" 1271 | }, 1272 | "type": "library", 1273 | "extra": { 1274 | "thanks": { 1275 | "name": "symfony/polyfill", 1276 | "url": "https://github.com/symfony/polyfill" 1277 | } 1278 | }, 1279 | "autoload": { 1280 | "files": [ 1281 | "bootstrap.php" 1282 | ], 1283 | "psr-4": { 1284 | "Symfony\\Polyfill\\Php80\\": "" 1285 | }, 1286 | "classmap": [ 1287 | "Resources/stubs" 1288 | ] 1289 | }, 1290 | "notification-url": "https://packagist.org/downloads/", 1291 | "license": [ 1292 | "MIT" 1293 | ], 1294 | "authors": [ 1295 | { 1296 | "name": "Ion Bazan", 1297 | "email": "ion.bazan@gmail.com" 1298 | }, 1299 | { 1300 | "name": "Nicolas Grekas", 1301 | "email": "p@tchwork.com" 1302 | }, 1303 | { 1304 | "name": "Symfony Community", 1305 | "homepage": "https://symfony.com/contributors" 1306 | } 1307 | ], 1308 | "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", 1309 | "homepage": "https://symfony.com", 1310 | "keywords": [ 1311 | "compatibility", 1312 | "polyfill", 1313 | "portable", 1314 | "shim" 1315 | ], 1316 | "support": { 1317 | "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" 1318 | }, 1319 | "funding": [ 1320 | { 1321 | "url": "https://symfony.com/sponsor", 1322 | "type": "custom" 1323 | }, 1324 | { 1325 | "url": "https://github.com/fabpot", 1326 | "type": "github" 1327 | }, 1328 | { 1329 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1330 | "type": "tidelift" 1331 | } 1332 | ], 1333 | "time": "2024-09-09T11:45:10+00:00" 1334 | }, 1335 | { 1336 | "name": "symfony/process", 1337 | "version": "v7.1.5", 1338 | "source": { 1339 | "type": "git", 1340 | "url": "https://github.com/symfony/process.git", 1341 | "reference": "5c03ee6369281177f07f7c68252a280beccba847" 1342 | }, 1343 | "dist": { 1344 | "type": "zip", 1345 | "url": "https://api.github.com/repos/symfony/process/zipball/5c03ee6369281177f07f7c68252a280beccba847", 1346 | "reference": "5c03ee6369281177f07f7c68252a280beccba847", 1347 | "shasum": "" 1348 | }, 1349 | "require": { 1350 | "php": ">=8.2" 1351 | }, 1352 | "type": "library", 1353 | "autoload": { 1354 | "psr-4": { 1355 | "Symfony\\Component\\Process\\": "" 1356 | }, 1357 | "exclude-from-classmap": [ 1358 | "/Tests/" 1359 | ] 1360 | }, 1361 | "notification-url": "https://packagist.org/downloads/", 1362 | "license": [ 1363 | "MIT" 1364 | ], 1365 | "authors": [ 1366 | { 1367 | "name": "Fabien Potencier", 1368 | "email": "fabien@symfony.com" 1369 | }, 1370 | { 1371 | "name": "Symfony Community", 1372 | "homepage": "https://symfony.com/contributors" 1373 | } 1374 | ], 1375 | "description": "Executes commands in sub-processes", 1376 | "homepage": "https://symfony.com", 1377 | "support": { 1378 | "source": "https://github.com/symfony/process/tree/v7.1.5" 1379 | }, 1380 | "funding": [ 1381 | { 1382 | "url": "https://symfony.com/sponsor", 1383 | "type": "custom" 1384 | }, 1385 | { 1386 | "url": "https://github.com/fabpot", 1387 | "type": "github" 1388 | }, 1389 | { 1390 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1391 | "type": "tidelift" 1392 | } 1393 | ], 1394 | "time": "2024-09-19T21:48:23+00:00" 1395 | }, 1396 | { 1397 | "name": "symfony/service-contracts", 1398 | "version": "v3.5.0", 1399 | "source": { 1400 | "type": "git", 1401 | "url": "https://github.com/symfony/service-contracts.git", 1402 | "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" 1403 | }, 1404 | "dist": { 1405 | "type": "zip", 1406 | "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", 1407 | "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", 1408 | "shasum": "" 1409 | }, 1410 | "require": { 1411 | "php": ">=8.1", 1412 | "psr/container": "^1.1|^2.0", 1413 | "symfony/deprecation-contracts": "^2.5|^3" 1414 | }, 1415 | "conflict": { 1416 | "ext-psr": "<1.1|>=2" 1417 | }, 1418 | "type": "library", 1419 | "extra": { 1420 | "branch-alias": { 1421 | "dev-main": "3.5-dev" 1422 | }, 1423 | "thanks": { 1424 | "name": "symfony/contracts", 1425 | "url": "https://github.com/symfony/contracts" 1426 | } 1427 | }, 1428 | "autoload": { 1429 | "psr-4": { 1430 | "Symfony\\Contracts\\Service\\": "" 1431 | }, 1432 | "exclude-from-classmap": [ 1433 | "/Test/" 1434 | ] 1435 | }, 1436 | "notification-url": "https://packagist.org/downloads/", 1437 | "license": [ 1438 | "MIT" 1439 | ], 1440 | "authors": [ 1441 | { 1442 | "name": "Nicolas Grekas", 1443 | "email": "p@tchwork.com" 1444 | }, 1445 | { 1446 | "name": "Symfony Community", 1447 | "homepage": "https://symfony.com/contributors" 1448 | } 1449 | ], 1450 | "description": "Generic abstractions related to writing services", 1451 | "homepage": "https://symfony.com", 1452 | "keywords": [ 1453 | "abstractions", 1454 | "contracts", 1455 | "decoupling", 1456 | "interfaces", 1457 | "interoperability", 1458 | "standards" 1459 | ], 1460 | "support": { 1461 | "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" 1462 | }, 1463 | "funding": [ 1464 | { 1465 | "url": "https://symfony.com/sponsor", 1466 | "type": "custom" 1467 | }, 1468 | { 1469 | "url": "https://github.com/fabpot", 1470 | "type": "github" 1471 | }, 1472 | { 1473 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1474 | "type": "tidelift" 1475 | } 1476 | ], 1477 | "time": "2024-04-18T09:32:20+00:00" 1478 | }, 1479 | { 1480 | "name": "symfony/string", 1481 | "version": "v7.1.5", 1482 | "source": { 1483 | "type": "git", 1484 | "url": "https://github.com/symfony/string.git", 1485 | "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306" 1486 | }, 1487 | "dist": { 1488 | "type": "zip", 1489 | "url": "https://api.github.com/repos/symfony/string/zipball/d66f9c343fa894ec2037cc928381df90a7ad4306", 1490 | "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306", 1491 | "shasum": "" 1492 | }, 1493 | "require": { 1494 | "php": ">=8.2", 1495 | "symfony/polyfill-ctype": "~1.8", 1496 | "symfony/polyfill-intl-grapheme": "~1.0", 1497 | "symfony/polyfill-intl-normalizer": "~1.0", 1498 | "symfony/polyfill-mbstring": "~1.0" 1499 | }, 1500 | "conflict": { 1501 | "symfony/translation-contracts": "<2.5" 1502 | }, 1503 | "require-dev": { 1504 | "symfony/emoji": "^7.1", 1505 | "symfony/error-handler": "^6.4|^7.0", 1506 | "symfony/http-client": "^6.4|^7.0", 1507 | "symfony/intl": "^6.4|^7.0", 1508 | "symfony/translation-contracts": "^2.5|^3.0", 1509 | "symfony/var-exporter": "^6.4|^7.0" 1510 | }, 1511 | "type": "library", 1512 | "autoload": { 1513 | "files": [ 1514 | "Resources/functions.php" 1515 | ], 1516 | "psr-4": { 1517 | "Symfony\\Component\\String\\": "" 1518 | }, 1519 | "exclude-from-classmap": [ 1520 | "/Tests/" 1521 | ] 1522 | }, 1523 | "notification-url": "https://packagist.org/downloads/", 1524 | "license": [ 1525 | "MIT" 1526 | ], 1527 | "authors": [ 1528 | { 1529 | "name": "Nicolas Grekas", 1530 | "email": "p@tchwork.com" 1531 | }, 1532 | { 1533 | "name": "Symfony Community", 1534 | "homepage": "https://symfony.com/contributors" 1535 | } 1536 | ], 1537 | "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", 1538 | "homepage": "https://symfony.com", 1539 | "keywords": [ 1540 | "grapheme", 1541 | "i18n", 1542 | "string", 1543 | "unicode", 1544 | "utf-8", 1545 | "utf8" 1546 | ], 1547 | "support": { 1548 | "source": "https://github.com/symfony/string/tree/v7.1.5" 1549 | }, 1550 | "funding": [ 1551 | { 1552 | "url": "https://symfony.com/sponsor", 1553 | "type": "custom" 1554 | }, 1555 | { 1556 | "url": "https://github.com/fabpot", 1557 | "type": "github" 1558 | }, 1559 | { 1560 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1561 | "type": "tidelift" 1562 | } 1563 | ], 1564 | "time": "2024-09-20T08:28:38+00:00" 1565 | }, 1566 | { 1567 | "name": "webmozart/glob", 1568 | "version": "4.7.0", 1569 | "source": { 1570 | "type": "git", 1571 | "url": "https://github.com/webmozarts/glob.git", 1572 | "reference": "8a2842112d6916e61e0e15e316465b611f3abc17" 1573 | }, 1574 | "dist": { 1575 | "type": "zip", 1576 | "url": "https://api.github.com/repos/webmozarts/glob/zipball/8a2842112d6916e61e0e15e316465b611f3abc17", 1577 | "reference": "8a2842112d6916e61e0e15e316465b611f3abc17", 1578 | "shasum": "" 1579 | }, 1580 | "require": { 1581 | "php": "^7.3 || ^8.0.0" 1582 | }, 1583 | "require-dev": { 1584 | "phpunit/phpunit": "^9.5", 1585 | "symfony/filesystem": "^5.3" 1586 | }, 1587 | "type": "library", 1588 | "extra": { 1589 | "branch-alias": { 1590 | "dev-master": "4.1-dev" 1591 | } 1592 | }, 1593 | "autoload": { 1594 | "psr-4": { 1595 | "Webmozart\\Glob\\": "src/" 1596 | } 1597 | }, 1598 | "notification-url": "https://packagist.org/downloads/", 1599 | "license": [ 1600 | "MIT" 1601 | ], 1602 | "authors": [ 1603 | { 1604 | "name": "Bernhard Schussek", 1605 | "email": "bschussek@gmail.com" 1606 | } 1607 | ], 1608 | "description": "A PHP implementation of Ant's glob.", 1609 | "support": { 1610 | "issues": "https://github.com/webmozarts/glob/issues", 1611 | "source": "https://github.com/webmozarts/glob/tree/4.7.0" 1612 | }, 1613 | "time": "2024-03-07T20:33:40+00:00" 1614 | } 1615 | ], 1616 | "packages-dev": [], 1617 | "aliases": [], 1618 | "minimum-stability": "stable", 1619 | "stability-flags": { 1620 | "phpbench/phpbench": 20 1621 | }, 1622 | "prefer-stable": false, 1623 | "prefer-lowest": false, 1624 | "platform": [], 1625 | "platform-dev": [], 1626 | "plugin-api-version": "2.6.0" 1627 | } 1628 | -------------------------------------------------------------------------------- /old/construct-vs-closur-bind/CacheItem.php: -------------------------------------------------------------------------------- 1 | a = $a; 14 | $this->b = $b; 15 | $this->c = $c; 16 | $this->d = $d; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /old/construct-vs-closur-bind/CacheItemNoConstruct.php: -------------------------------------------------------------------------------- 1 | createCacheItem = \Closure::bind( 15 | function ($a, $b, $c) use ($d) { 16 | $item = new CacheItemNoConstruct(); 17 | $item->a = $a; 18 | $item->b = $b; 19 | $item->c = $c; 20 | $item->d = $d; 21 | 22 | return $item; 23 | }, 24 | null, 25 | CacheItemNoConstruct::class 26 | ); 27 | } 28 | 29 | /** @Revs(100000) */ 30 | public function benchConstruct() 31 | { 32 | new CacheItem(1, 2, 3, 4); 33 | } 34 | 35 | /** @Revs(100000) */ 36 | public function benchClosureBind() 37 | { 38 | $d = 4; 39 | $f = $this->createCacheItem; 40 | 41 | $f(1, 2, 3); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /old/php-bench-01.php: -------------------------------------------------------------------------------- 1 | name; 15 | } 16 | 17 | public function __get($key) 18 | { 19 | return $this->$key; 20 | } 21 | 22 | public function setName($name) 23 | { 24 | return $this->name = $name; 25 | } 26 | 27 | public function __set($key, $value) 28 | { 29 | return $this->$key = $value; 30 | } 31 | } 32 | 33 | define('LOOP_MAX', 1000000); 34 | 35 | // get via property 36 | $dog = new baseDog(); 37 | $tGetPropertyStart = microtime(true); 38 | for($i = 0; $i <= LOOP_MAX; $i++) 39 | { 40 | $dog->name; 41 | } 42 | $tGetProperty = microtime(true) - $tGetPropertyStart; 43 | 44 | // get via get 45 | $dog = new dog(); 46 | $tGetGetStart = microtime(true); 47 | for($i = 0; $i <= LOOP_MAX; $i++) 48 | { 49 | $dog->getName(); 50 | } 51 | $tGetGet = microtime(true) - $tGetGetStart; 52 | 53 | // get via __get 54 | $dog = new dog(); 55 | $tGet__GetStart = microtime(true); 56 | for($i = 0; $i <= LOOP_MAX; $i++) 57 | { 58 | $dog->name; 59 | } 60 | $tGet__Get = microtime(true) - $tGet__GetStart; 61 | 62 | // set via property 63 | $dog = new baseDog(); 64 | $tSetPropertyStart = microtime(true); 65 | for($i = 0; $i <= LOOP_MAX; $i++) 66 | { 67 | $dog->name = "dog"; 68 | } 69 | $tSetProperty = microtime(true) - $tSetPropertyStart; 70 | 71 | // set via set 72 | $dog = new dog(); 73 | $tSetSetStart = microtime(true); 74 | for($i = 0; $i <= LOOP_MAX; $i++) 75 | { 76 | $dog->setName("dog"); 77 | } 78 | $tSetSet = microtime(true) - $tSetSetStart; 79 | 80 | // set via __set 81 | $dog = new dog(); 82 | $tSet__SetStart = microtime(true); 83 | for($i = 0; $i <= LOOP_MAX; $i++) 84 | { 85 | $dog->name = "dog"; 86 | } 87 | $tSet__Set = microtime(true) - $tSet__SetStart; 88 | 89 | echo phpversion()."\n"; 90 | echo 'GET'."\n"; 91 | foreach (array('property' => $tGetProperty, 'get' => $tGetGet, '__get' => $tGet__Get) as $key => $value) 92 | { 93 | $ratio = $value / $tGetProperty; 94 | echo sprintf('[%-8s] : %f', $key, $ratio)."\n"; 95 | } 96 | echo 'SET'."\n"; 97 | foreach (array('property' => $tSetProperty, 'set' => $tSetSet, '__set' => $tSet__Set) as $key => $value) 98 | { 99 | $ratio = $value / $tSetProperty; 100 | echo sprintf('[%-8s] : %f', $key, $ratio)."\n"; 101 | } 102 | echo "\n\n"; 103 | -------------------------------------------------------------------------------- /old/php-bench-02.php: -------------------------------------------------------------------------------- 1 | 'test', 6 | 1 => 'test', 7 | 2 => 'test', 8 | 5 => 'test', 9 | ); 10 | 11 | define('LOOP_MAX', 1000000); 12 | 13 | // Isset return false 14 | $tIssetFalseStart = microtime(true); 15 | for($i = 0; $i <= LOOP_MAX; $i++) 16 | { 17 | if (isset($array[4])) 18 | { 19 | $a = $array[4]; 20 | } 21 | $a = null; 22 | } 23 | $tIssetFalse = microtime(true) - $tIssetFalseStart; 24 | 25 | // Isset return true 26 | $tIssetTrueStart = microtime(true); 27 | for($i = 0; $i <= LOOP_MAX; $i++) 28 | { 29 | if (isset($array[0])) 30 | { 31 | $a = $array[0]; 32 | } 33 | $a = null; 34 | } 35 | $tIssetTrue = microtime(true) - $tIssetTrueStart; 36 | 37 | // @ return false 38 | $tAtFalseStart = microtime(true); 39 | for($i = 0; $i <= LOOP_MAX; $i++) 40 | { 41 | $a = @$array[4]; 42 | } 43 | $tAtFalse = microtime(true) - $tAtFalseStart; 44 | 45 | // @ return true 46 | $tAtTrueStart = microtime(true); 47 | for($i = 0; $i <= LOOP_MAX; $i++) 48 | { 49 | $a = @$array[0]; 50 | } 51 | $tAtTrue = microtime(true) - $tAtTrueStart; 52 | 53 | 54 | echo phpversion()."\n"; 55 | echo 'We test something not set'."\n"; 56 | foreach (array('isset' => $tIssetFalse, '@' => $tAtFalse) as $key => $value) 57 | { 58 | $ratio = $value / $tIssetFalse; 59 | echo sprintf('[%-8s] : %f', $key, $ratio)."\n"; 60 | } 61 | echo 'We test something set'."\n"; 62 | foreach (array('isset' => $tIssetTrue, '@' => $tAtTrue) as $key => $value) 63 | { 64 | $ratio = $value / $tIssetTrue; 65 | echo sprintf('[%-8s] : %f', $key, $ratio)."\n"; 66 | } 67 | 68 | echo "\n\n"; 69 | -------------------------------------------------------------------------------- /old/php-bench-03.php: -------------------------------------------------------------------------------- 1 | b2 = array(); 17 | } 18 | } 19 | 20 | class C 21 | { 22 | private $c1; 23 | private $c2; 24 | 25 | public function __construct() 26 | { 27 | $this->c1 = array(); 28 | $this->c2 = array(); 29 | } 30 | } 31 | 32 | define('LOOP_MAX', 1000000); 33 | 34 | // all as attribute 35 | $tAStart = microtime(true); 36 | for($i = 0; $i <= LOOP_MAX; $i++) 37 | { 38 | new A(); 39 | } 40 | $tA = microtime(true) - $tAStart; 41 | 42 | // one as attribute, one in construct 43 | $tBStart = microtime(true); 44 | for($i = 0; $i <= LOOP_MAX; $i++) 45 | { 46 | new B(); 47 | } 48 | $tB = microtime(true) - $tBStart; 49 | 50 | // all in construct 51 | $tCStart = microtime(true); 52 | for($i = 0; $i <= LOOP_MAX; $i++) 53 | { 54 | new C(); 55 | } 56 | $tC = microtime(true) - $tCStart; 57 | 58 | echo phpversion()."\n"; 59 | foreach (array('attribute' => $tA, 'both' => $tB, 'construct' => $tC) as $key => $value) 60 | { 61 | $ratio = $value / $tA; 62 | echo sprintf('[%-10s] : %f', $key, $ratio)."\n"; 63 | } 64 | echo "\n\n"; 65 | -------------------------------------------------------------------------------- /old/php-bench-04.php: -------------------------------------------------------------------------------- 1 | $tA, 'isset' => $tB, 'array_key_exists' => $tC) as $key => $value) 35 | { 36 | $ratio = $value / $tB; 37 | echo sprintf('[%-16s] : %f', $key, $ratio)."\n"; 38 | } 39 | echo "\n\n"; 40 | -------------------------------------------------------------------------------- /old/php-bench-05.php: -------------------------------------------------------------------------------- 1 | getId(); 20 | } 21 | } 22 | $tA = microtime(true) - $tAStart; 23 | 24 | // isset 25 | $tBStart = microtime(true); 26 | for($i = 0; $i <= LOOP_MAX; $i++) 27 | { 28 | $foo = new Foo(); 29 | $id = $foo->getId();; 30 | for ($i=0; $i < 2000; $i++) { 31 | $id; 32 | } 33 | } 34 | $tB = microtime(true) - $tBStart; 35 | 36 | echo phpversion()."\n"; 37 | foreach (array('get' => $tA, 'var' => $tB) as $key => $value) 38 | { 39 | $ratio = $value / $tB; 40 | echo sprintf('[%-16s] : %f', $key, $ratio)."\n"; 41 | } 42 | echo "\n\n"; 43 | -------------------------------------------------------------------------------- /old/php-bench-06.php: -------------------------------------------------------------------------------- 1 | array(), 9 | 'new2' => array(), 10 | 'new3' => array(), 11 | 'new4' => array(), 12 | ); 13 | 14 | public function getBigValue($index) 15 | { 16 | return $this->big[$index]; 17 | } 18 | } 19 | 20 | class AnalysisDiff 21 | { 22 | private $newIds; 23 | private $existingIds; 24 | private $fixedIds; 25 | private $ignoredIds; 26 | 27 | public function __construct(array $newIds = array(), array $existingIds = array(), array $fixedIds = array(), array $ignoredIds = array()) 28 | { 29 | $this->newIds = $newIds; 30 | $this->existingIds = $existingIds; 31 | $this->fixedIds = $fixedIds; 32 | $this->ignoredIds = $ignoredIds; 33 | } 34 | 35 | public function getNewIds() 36 | { 37 | return $this->newIds; 38 | } 39 | 40 | public function addNewId($id) 41 | { 42 | $this->newIds[$id] = $id; 43 | } 44 | 45 | public function hasNewId($id) 46 | { 47 | return array_key_exists($id, $this->newIds); 48 | } 49 | 50 | public function deletedNewId($id); 51 | { 52 | unset($this->newIds[$id]); 53 | } 54 | 55 | // same things for other properties 56 | 57 | public function jsonSerialize() 58 | { 59 | return array( 60 | 'newIds' => array_values($this->newIds), 61 | 'existingIds' => array_values($this->existingIds), 62 | 'fixedIds' => array_values($this->fixedIds), 63 | 'ignoredIds' => array_values($this->ignoredIds), 64 | ); 65 | } 66 | 67 | public function countViolationByStatus() 68 | { 69 | return array( 70 | 'newIds' => count(array_diff_key($this->newIds, $this->ignored)), 71 | 'existingIds' => count(array_diff_key($this->existingIds, $this->ignored)), 72 | 'fixedIds' => count(array_diff_key($this->fixedIds, $this->ignored)), 73 | 'ignoredIds' => count($this->ignoredIds), 74 | ); 75 | } 76 | } 77 | 78 | $tAStart = microtime(true); 79 | $big = new Big(); 80 | for($i = 0; $i <= LOOP_MAX; $i++) 81 | { 82 | $big->getBigValue('new3'); 83 | } 84 | $tA = microtime(true) - $tAStart; 85 | 86 | $tBStart = microtime(true); 87 | $small = new Small(); 88 | for($i = 0; $i <= LOOP_MAX; $i++) 89 | { 90 | $small->getSmallValue('new3'); 91 | } 92 | $tB = microtime(true) - $tBStart; 93 | 94 | echo phpversion()."\n"; 95 | foreach (array('big' => $tA, 'small' => $tB) as $key => $value) 96 | { 97 | $ratio = $value / $tB; 98 | echo sprintf('[%-16s] : %f', $key, $ratio)."\n"; 99 | } 100 | echo "\n\n"; 101 | -------------------------------------------------------------------------------- /old/php-bench-07.php: -------------------------------------------------------------------------------- 1 | getCallBack(); 35 | $c(); 36 | } 37 | $tA = microtime(true) - $tAStart; 38 | 39 | $tBStart = microtime(true); 40 | for($i = 0; $i <= LOOP_MAX; $i++) 41 | { 42 | $c = $b->getCallBack(); 43 | $c(); 44 | } 45 | $tB = microtime(true) - $tBStart; 46 | 47 | echo phpversion()."\n"; 48 | foreach (array('anonymous' => $tA, 'method' => $tB) as $key => $value) 49 | { 50 | $ratio = $value / $tB; 51 | echo sprintf('[%-16s] : %f', $key, $ratio)."\n"; 52 | } 53 | echo "\n\n"; 54 | -------------------------------------------------------------------------------- /old/php-bench-08.php: -------------------------------------------------------------------------------- 1 | $tA, 'root' => $tB) as $key => $value) 33 | { 34 | $ratio = $value / $tB; 35 | echo sprintf('[%-16s] : %f', $key, $ratio)."\n"; 36 | } 37 | echo "\n"; 38 | } 39 | } 40 | 41 | namespace { 42 | foo\foo(); 43 | } 44 | -------------------------------------------------------------------------------- /old/result-bench-01.txt: -------------------------------------------------------------------------------- 1 | php 5.2.7 : 2 | GET 3 | [property] : 1.000000 4 | [get ] : 3.696804 5 | [__get ] : 5.063196 6 | SET 7 | [property] : 1.000000 8 | [set ] : 3.940685 9 | [__set ] : 4.804387 10 | 11 | 12 | php 5.3.6 13 | GET 14 | [property] : 1.000000 15 | [get ] : 1.585423 16 | [__get ] : 2.785906 17 | SET 18 | [property] : 1.000000 19 | [set ] : 1.941568 20 | [__set ] : 2.744577 21 | 22 | 23 | 5.4.7-1~dotdeb.0 24 | GET 25 | [property] : 1.000000 26 | [get ] : 3.943535 27 | [__get ] : 5.130856 28 | SET 29 | [property] : 1.000000 30 | [set ] : 3.944191 31 | [__set ] : 4.770218 32 | 33 | 34 | -------------------------------------------------------------------------------- /old/result-bench-02.txt: -------------------------------------------------------------------------------- 1 | 5.2.17-0.dotdeb.0 2 | We test something not set 3 | [isset ] : 1.000000 4 | [@ ] : 3.427503 5 | We test something set 6 | [isset ] : 1.000000 7 | [@ ] : 1.529751 8 | 9 | 10 | 5.3.6 11 | We test something not set 12 | [isset ] : 1.000000 13 | [@ ] : 6.993796 14 | We test something set 15 | [isset ] : 1.000000 16 | [@ ] : 3.275385 17 | 18 | 19 | 5.4.7-1~dotdeb.0 20 | We test something not set 21 | [isset ] : 1.000000 22 | [@ ] : 2.819538 23 | We test something set 24 | [isset ] : 1.000000 25 | [@ ] : 1.069074 26 | 27 | 28 | -------------------------------------------------------------------------------- /old/result-bench-03.txt: -------------------------------------------------------------------------------- 1 | 5.2.17-0.dotdeb.0 2 | [attribute ] : 1.000000 3 | [both ] : 2.716186 4 | [construct ] : 3.083696 5 | 6 | 7 | 5.3.6 8 | [attribute ] : 1.000000 9 | [both ] : 2.975947 10 | [construct ] : 3.356322 11 | 12 | 13 | 5.4.7-1~dotdeb.0 14 | [attribute ] : 1.000000 15 | [both ] : 3.110702 16 | [construct ] : 3.571433 17 | 18 | 19 | -------------------------------------------------------------------------------- /old/result-bench-04.txt: -------------------------------------------------------------------------------- 1 | 5.3.17-1~dotdeb.0 2 | [in_array ] : 635.614110 3 | [isset ] : 1.000000 4 | [array_key_exists] : 3.275343 5 | 6 | 7 | 5.2.17-0.dotdeb.0 8 | [in_array ] : 1029.341540 9 | [isset ] : 1.000000 10 | [array_key_exists] : 3.287562 11 | 12 | 13 | 5.4.7-1~dotdeb.0 14 | [in_array ] : 747.249286 15 | [isset ] : 1.000000 16 | [array_key_exists] : 3.251335 17 | 18 | 19 | -------------------------------------------------------------------------------- /phpbench.json: -------------------------------------------------------------------------------- 1 | { 2 | "runner.bootstrap": "vendor/autoload.php" 3 | } 4 | -------------------------------------------------------------------------------- /src/Processor.php: -------------------------------------------------------------------------------- 1 | type = $type; 13 | if ('exception' === $type) { 14 | $this->processor = new WithException($randomness); 15 | } elseif ('support' === $type) { 16 | $this->processor = new WithSupport($randomness); 17 | } else { 18 | throw new \InvalidArgumentException("The '$type' is not supported."); 19 | } 20 | } 21 | 22 | public function process(int $level = 10) 23 | { 24 | // Just increase the stack size to be more realist 25 | if (0 < $level) { 26 | return $this->process(--$level); 27 | } 28 | if ('exception' === $this->type) { 29 | try { 30 | return $this->processor->process(); 31 | } catch (\LogicException $e) { 32 | return null; 33 | } 34 | } 35 | 36 | if ('support' === $this->type) { 37 | if ($this->processor->support()) { 38 | return $this->processor->process(); 39 | } 40 | 41 | return null; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/WithException.php: -------------------------------------------------------------------------------- 1 | randomness = $randomness; 12 | } 13 | 14 | public function process() 15 | { 16 | if (mt_rand(0, 100) < $this->randomness) { 17 | throw new \LogicException('Error Processing Request', 1); 18 | } 19 | 20 | return true; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/WithSupport.php: -------------------------------------------------------------------------------- 1 | randomness = $randomness; 12 | } 13 | 14 | public function process() 15 | { 16 | return true; 17 | } 18 | 19 | public function support() 20 | { 21 | return mt_rand(0, 100) < $this->randomness; 22 | } 23 | } 24 | --------------------------------------------------------------------------------