<?php
function exemplo
(array $args) { $pares = array('par1' => 1, 'par2' => 2);
return $par1 .' - '. $par2;
}
echo exemplo([]) . "\n"; // 1 - 2
echo exemplo(['par1' => 3]) . "\n"; // 3 - 2
echo exemplo(['par1' => 3, 'par2' => 4]) . "\n"; // 3 - 4
echo exemplo(['par2' => 4]) . "\n"; // 1 - 4
PD9waHAKCmZ1bmN0aW9uIGV4ZW1wbG8oYXJyYXkgJGFyZ3MpIHsKCSRwYXJlcyA9IGFycmF5KCdwYXIxJyA9PiAxLCAncGFyMicgPT4gMik7CgkkYXJncyA9IGFycmF5X21lcmdlKCRwYXJlcywgYXJyYXlfaW50ZXJzZWN0X2tleSgkYXJncywgJHBhcmVzKSk7CglsaXN0KCRwYXIxLCAkcGFyMikgPSBhcnJheV92YWx1ZXMoJGFyZ3MpOwoJCglyZXR1cm4gJHBhcjEgLicgLSAnLiAkcGFyMjsKCQp9CgplY2hvIGV4ZW1wbG8oW10pIC4gIlxuIjsgICAgICAgICAgICAgICAgICAgICAgICAgLy8gMSAtIDIKZWNobyBleGVtcGxvKFsncGFyMScgPT4gM10pIC4gIlxuIjsgICAgICAgICAgICAgIC8vIDMgLSAyCmVjaG8gZXhlbXBsbyhbJ3BhcjEnID0+IDMsICdwYXIyJyA9PiA0XSkgLiAiXG4iOyAvLyAzIC0gNAplY2hvIGV4ZW1wbG8oWydwYXIyJyA9PiA0XSkgLiAiXG4iOyAgICAgICAgICAgICAgLy8gMSAtIDQ=