Skip to content

Instantly share code, notes, and snippets.

@lahmacun
Last active January 10, 2018 19:14
Show Gist options
  • Save lahmacun/d0a708e0599df6088e292aac67aa4d7c to your computer and use it in GitHub Desktop.
Save lahmacun/d0a708e0599df6088e292aac67aa4d7c to your computer and use it in GitHub Desktop.
<?php
function topla() {
$toplam = 0;
$argumanSayisi = func_num_args();
for ($i = 0; $i < $argumanSayisi; $i ++) {
$toplam += func_get_arg($i);
}
return $toplam;
}
// Ornek Kullanim
// echo topla(5, 10, 15); // 30 dondurur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment