3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

preferences:
23.93 ms | 405 KiB | 5 Q