Zugriff auf äußere variable Anwendungsbereich von innerhalb eines Funktionsbereichs

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Zugriff auf äußere variable Anwendungsbereich von innerhalb eines Funktionsbereichs

by Guest » 10 Feb 2025, 09:26

Ich versuche eine Hakenfunktion zu finden, aber ich muss außerhalb der Hakenklasse oder -funktion auf variable Referenzen zugreifen. Grundsätzlich von wo aus der Haken genannt wird. Verwendung von Use () Referenzierung ist nur auf die angegebenen Personen beschränkt.

Code: Select all

  // Variable in a scope
$couldbeanything = null;

// Hook structure with local scope
class hook {
public static function exec() {
// Modify anything in scope
// ...
}
}

// Hook executed in scope
hook::exec();

var_dump($couldbeanything);

Top