Hi! Is it possible to pass objects like you do in JavaScript in PHP:

function example($args){
   ...
}

example({foo: 'bar', lorem: 'ipsum'});

Or something similar to this? So that you both get an "infinite" number of arguments and a chosen name for the variable ($args). I know you can use an array but I prefer the JavaScript syntax of objects because it's clearer and less to type :)

//you can use an associative array and retrieve $args['foo'] $args['lorem'] within the function
$a=array("foo"=>'bar', "lorem"=>'ipsum');
example( $a );

//OR you can cast it to a "generic" object and access it at $args->foo and $args->lorem 
$a= (object) array("foo"=>'bar', "lorem"=>'ipsum');
example( $a );