{"id":1516,"date":"2013-07-23T11:53:35","date_gmt":"2013-07-23T08:53:35","guid":{"rendered":"http:\/\/www.mustafaozcan.info\/blog\/?p=1516"},"modified":"2013-07-23T11:53:35","modified_gmt":"2013-07-23T08:53:35","slug":"php-fonksiyonlar-kullanici-tanimli-islevler","status":"publish","type":"post","link":"http:\/\/www.mustafaozcan.info\/blog\/php-fonksiyonlar-kullanici-tanimli-islevler.html","title":{"rendered":"PHP Fonksiyonlar &#8211; Kullan\u0131c\u0131 Tan\u0131ml\u0131 \u0130\u015flevler"},"content":{"rendered":"<div class=\"musta-icerikten-once\" style=\"margin-left: auto;margin-right: auto;text-align: center;\" id=\"musta-1756275881\"><div id=\"waldo-tag-4179\"><\/div><\/div><p>Bir s\u00fcredir <strong>PHP<\/strong> konusunda yaz\u0131 yazm\u0131yordum,bundan sonra biraz ona ilgi verelim.<strong>PHP<\/strong> konusunda \u00e7ok arkada\u015f\u0131m destek istiyor onlar i\u00e7in geni\u015f bir ar\u015fiv olu\u015fturay\u0131m istedim.<\/p>\n<h1>Kullan\u0131c\u0131 Tan\u0131ml\u0131 \u0130\u015flevler<\/h1>\n<p><code>&lt;?php<br \/>\nfunction\u00a0foo($arg_1,\u00a0$arg_2,\u00a0\/*\u00a0...,\u00a0*\/\u00a0$arg_n)<br \/>\n{<br \/>\necho\u00a0\"\u00d6rnek\u00a0i\u015flev.\\n\";<br \/>\nreturn\u00a0$retval;<br \/>\n}<br \/>\n?&gt;<\/code><\/p>\n<p>PHP &#8216;de <strong>i\u015flev<\/strong> isimleri di\u011fer isimlerle ayn\u0131 kurallara tabidir. Ge\u00e7erli bir i\u015flev ismi bir harf ya da alt \u00e7izgi ile ba\u015flar, herhangi bir say\u0131da ge\u00e7erli harf, say\u0131 ya da alt \u00e7izgi ile devam eder.<strong>[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*<\/strong> \u015feklinde ifade edilebilinir.<\/p>\n<p><code>&lt;?php $makefoo = true;<\/p>\n<p>\/* Hen\u00fcz varolmad\u0131\u011f\u0131 i\u00e7in foo() buradan \u00e7a\u011fr\u0131lamaz,<br \/>\n   ancak bar() \u00e7a\u011fr\u0131labilir *\/<\/p>\n<p>bar();<\/p>\n<p>if ($makefoo) {<br \/>\n  function foo()<br \/>\n  {<br \/>\n    echo \"Uygulaman\u0131n \u00e7al\u0131\u015fmas\u0131 bana eri\u015fene kadar ben yokum.\\n\";<br \/>\n  }<br \/>\n}<\/p>\n<p>\/* $makefoo do\u011fru oldu\u011fundan<br \/>\n   art\u0131k foo() \u00e7a\u011fr\u0131labilir *\/<\/p>\n<p>if ($makefoo) foo();<\/p>\n<p>function bar()<br \/>\n{<br \/>\n  echo \"Program ba\u015flat\u0131ld\u0131\u011f\u0131 anda ben de varolurum.\\n\";<br \/>\n}<br \/>\n?&gt;<\/code><\/p>\n<p>Yukar\u0131daki \u00f6rnekte g\u00f6sterildi\u011fi gibi ko\u015fullu olarak tan\u0131mland\u0131ysa, bu i\u015flev tan\u0131m\u0131n\u0131n <strong>i\u015flev<\/strong> \u00e7a\u011fr\u0131lmadan \u00f6nce yap\u0131lmas\u0131 gerekmektedir.<\/p>\n<div class=\"musta-icerikten-sonra\" id=\"musta-1460933848\"><div id=\"waldo-tag-4184\"><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Bir s\u00fcredir PHP konusunda yaz\u0131 yazm\u0131yordum,bundan sonra biraz ona ilgi verelim.PHP konusunda \u00e7ok arkada\u015f\u0131m destek istiyor onlar i\u00e7in geni\u015f bir ar\u015fiv olu\u015fturay\u0131m istedim. Kullan\u0131c\u0131 Tan\u0131ml\u0131 \u0130\u015flevler &lt;?php function\u00a0foo($arg_1,\u00a0$arg_2,\u00a0\/*\u00a0&#8230;,\u00a0*\/\u00a0$arg_n) { echo\u00a0&#8220;\u00d6rnek\u00a0i\u015flev.\\n&#8221;; return\u00a0$retval; } ?&gt; PHP &#8216;de i\u015flev isimleri di\u011fer isimlerle ayn\u0131 kurallara tabidir. Ge\u00e7erli bir i\u015flev ismi bir harf ya da alt \u00e7izgi ile ba\u015flar, herhangi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"powered_cache_disable_cache":false,"powered_cache_disable_critical_css":false,"powered_cache_specific_critical_css":false,"powered_cache_disable_css_optimization":false,"powered_cache_disable_js_optimization":false,"powered_cache_disable_js_defer":false,"powered_cache_disable_js_delay":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[7],"tags":[2735,2734,8,2731,5695,2732,2729,2730,2739,2736,2733,2738,2737],"class_list":["post-1516","post","type-post","status-publish","format-standard","hentry","category-php-dersleri","tag-islevler","tag-kullanici-tanimli-islevler","tag-php","tag-php-bar","tag-php-dersleri","tag-php-fonksiyon-kullanimlari","tag-php-fonksiyonlar","tag-php-foo","tag-php-functions-user-defined","tag-php-islev","tag-php-kullanici-tanimli-islevler","tag-php-user-defined","tag-user-defined"],"_links":{"self":[{"href":"http:\/\/www.mustafaozcan.info\/blog\/wp-json\/wp\/v2\/posts\/1516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.mustafaozcan.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mustafaozcan.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mustafaozcan.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mustafaozcan.info\/blog\/wp-json\/wp\/v2\/comments?post=1516"}],"version-history":[{"count":0,"href":"http:\/\/www.mustafaozcan.info\/blog\/wp-json\/wp\/v2\/posts\/1516\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.mustafaozcan.info\/blog\/wp-json\/wp\/v2\/media?parent=1516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mustafaozcan.info\/blog\/wp-json\/wp\/v2\/categories?post=1516"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mustafaozcan.info\/blog\/wp-json\/wp\/v2\/tags?post=1516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}