- print_r: documentation ( source)
<?php
class Foo {
private $_bar;
private $_baz;
public function __construct($bar, $baz) {
$this->_bar = $bar;
$this->_baz = $baz;
}
}
$params = ['lorem', 'ipsum'];
$foo = new Foo(...$params);
print_r($foo);