Last active
February 5, 2025 14:14
-
-
Save labi-le/c12966af51165a93b797a816a62484ed to your computer and use it in GitHub Desktop.
production ready
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class a | |
{ | |
private function __construct() | |
{ | |
var_dump("sasaassasasssaassaas"); | |
} | |
public function is_numeric($any) | |
{ | |
return is_numeric($any); | |
} | |
} | |
var_dump(([(fn() => new static)(...)->bindTo(...)(null, a::class)(...)(...)(...)(...)(), 'is_numeric'])(12)); | |
class b | |
{ | |
public function is_numeric($any) | |
{ | |
return is_numeric($any); | |
} | |
public static function is_numeric_static($any) | |
{ | |
return is_numeric($any); | |
} | |
} | |
$aa = ['b', 'is_numeric_static']; | |
var_dump($aa(12)); | |
var_dump(([new b, 'is_numeric'])(12)); | |
var_dump(([new b, 'is_numeric_static'])(12)); | |
var_dump((['b', 'is_numeric_static'])(12)); | |
var_dump((get_defined_vars()['aa'])(12)); | |
(function () use ($aa) { | |
var_dump((current(get_defined_vars()))(12)); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment