- var_dump: documentation ( source)
- debug_backtrace: documentation ( source)
<?php
class Something {
public function __construct(protected string $a, public int $b) {
var_dump(debug_backtrace(limit: 1));
var_dump(func_get_args());
}
}
$s_ordered = new Something('yo', 1337);
var_dump($s_ordered);
print "---------------\n";
$s_named = new Something(b: 1337, a: 'yo');
var_dump($s_named);