X7ROOT File Manager
Current Path:
/home/prisjneg/public_html/vendor/laravel/framework/src/Illuminate/Support
home
/
prisjneg
/
public_html
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Support
/
📁
..
📄
AggregateServiceProvider.php
(995 B)
📄
Benchmark.php
(1.93 KB)
📄
Carbon.php
(1.25 KB)
📄
Composer.php
(6.86 KB)
📄
ConfigurationUrlParser.php
(4.25 KB)
📄
DateFactory.php
(7.76 KB)
📄
DefaultProviders.php
(3.07 KB)
📄
Env.php
(2.96 KB)
📁
Exceptions
📁
Facades
📄
Fluent.php
(4.14 KB)
📄
HigherOrderTapProxy.php
(665 B)
📄
HtmlString.php
(1.03 KB)
📄
InteractsWithTime.php
(1.55 KB)
📄
Js.php
(3.44 KB)
📄
LICENSE.md
(1.05 KB)
📄
Lottery.php
(5.66 KB)
📄
Manager.php
(4.42 KB)
📄
MessageBag.php
(10.09 KB)
📄
MultipleInstanceManager.php
(4.25 KB)
📄
NamespacedItemResolver.php
(3.35 KB)
📄
Number.php
(8.09 KB)
📄
Optional.php
(2.64 KB)
📄
Pluralizer.php
(2.84 KB)
📄
ProcessUtils.php
(2 KB)
📄
Reflector.php
(4.5 KB)
📄
ServiceProvider.php
(10.99 KB)
📄
Sleep.php
(10.56 KB)
📄
Str.php
(52.55 KB)
📄
Stringable.php
(33.36 KB)
📁
Testing
📄
Timebox.php
(1.62 KB)
📁
Traits
📄
ValidatedInput.php
(12.08 KB)
📄
ViewErrorBag.php
(2.57 KB)
📄
composer.json
(1.74 KB)
📄
helpers.php
(10.6 KB)
Editing: Benchmark.php
<?php namespace Illuminate\Support; use Closure; class Benchmark { /** * Measure a callable or array of callables over the given number of iterations. * * @param \Closure|array $benchmarkables * @param int $iterations * @return array|float */ public static function measure(Closure|array $benchmarkables, int $iterations = 1): array|float { return collect(Arr::wrap($benchmarkables))->map(function ($callback) use ($iterations) { return collect(range(1, $iterations))->map(function () use ($callback) { gc_collect_cycles(); $start = hrtime(true); $callback(); return (hrtime(true) - $start) / 1000000; })->average(); })->when( $benchmarkables instanceof Closure, fn ($c) => $c->first(), fn ($c) => $c->all(), ); } /** * Measure a callable once and return the duration and result. * * @template TReturn of mixed * * @param (callable(): TReturn) $callback * @return array{0: TReturn, 1: float} */ public static function value(callable $callback): array { gc_collect_cycles(); $start = hrtime(true); $result = $callback(); return [$result, (hrtime(true) - $start) / 1000000]; } /** * Measure a callable or array of callables over the given number of iterations, then dump and die. * * @param \Closure|array $benchmarkables * @param int $iterations * @return never */ public static function dd(Closure|array $benchmarkables, int $iterations = 1): void { $result = collect(static::measure(Arr::wrap($benchmarkables), $iterations)) ->map(fn ($average) => number_format($average, 3).'ms') ->when($benchmarkables instanceof Closure, fn ($c) => $c->first(), fn ($c) => $c->all()); dd($result); } }
Upload File
Create Folder