{"id":223,"date":"2021-05-03T11:31:47","date_gmt":"2021-05-03T07:01:47","guid":{"rendered":"https:\/\/rabsana.ir\/tutorials\/?p=223"},"modified":"2021-10-31T08:44:26","modified_gmt":"2021-10-31T05:14:26","slug":"top-18-best-practices-for-writing-readable-codes","status":"publish","type":"post","link":"https:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/","title":{"rendered":"18 \u0631\u0648\u0634 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc"},"content":{"rendered":"<h3><a id=\"post-223-_qmjc5smqg99u\"><\/a>\u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u060c \u0646\u0642\u0634 \u062e\u06cc\u0644\u06cc \u0645\u0647\u0645\u06cc \u062f\u0631 \u0628\u062d\u062b \u062a\u0648\u0633\u0639\u0647 \u0648 \u067e\u06cc\u0634\u0631\u0641\u062a \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627 \u062f\u0627\u0631\u062f.<\/h3>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u0627\u0632 \u0622\u0646\u062c\u0627\u06cc\u06cc \u06a9\u0647 \u062e\u0648\u0627\u0646\u0627 \u0628\u0648\u062f\u0646 \u06a9\u062f \u0647\u0627 \u06cc\u06a9 \u0645\u0648\u0636\u0648\u0639 \u06af\u0633\u062a\u0631\u062f\u0647 \u0645\u062d\u0633\u0648\u0628 \u0645\u06cc \u0634\u0648\u062f\u060c \u0627\u0631\u0632\u0634 \u0627\u06cc\u0646 \u0631\u0627 \u062f\u0627\u0631\u062f \u06a9\u0647 \u0647\u0646\u06af\u0627\u0645 \u0627\u0646\u062c\u0627\u0645 \u067e\u0631\u0648\u0698\u0647 \u0628\u0635\u0648\u0631\u062a \u062a\u06a9\u06cc \u0648 \u06cc\u0627 \u062a\u06cc\u0645\u06cc \u0648 \u062d\u062a\u06cc \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0628\u0627 \u067e\u0631\u0648\u0698\u0647 \u0647\u0627\u06cc \u0645\u062a\u0646 \u0628\u0627\u0632 \u06cc\u0627 \u0627\u0648\u067e\u0646 \u0633\u0648\u0631\u0633 \u0633\u0631\u0648\u06a9\u0627\u0631 \u062f\u0627\u0631\u06cc\u062f\u060c \u0628\u06cc\u0634\u062a\u0631 \u0628\u0647 \u0622\u0646 \u0641\u06a9\u0631 \u06a9\u0646\u06cc\u062f \u0648 \u0628\u0631\u0627\u06cc \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0648 \u0627\u0646\u062c\u0627\u0645 \u0622\u0646 \u0648\u0642\u062a \u0628\u06af\u0630\u0627\u0631\u06cc\u062f. <strong>\u062f\u0631 \u0627\u062f\u0627\u0645\u0647 \u0642\u0631\u0627\u0631 \u0627\u0633\u062a 18 \u0631\u0648\u0634 \u0645\u0647\u0645 \u0648 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0631\u0627 \u0628\u0631\u0627\u06cc \u0628\u0627\u0644\u0627\u0628\u0631\u062f\u0646 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u0628\u06cc\u0627\u0645\u0648\u0632\u06cc\u0645.<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><a id=\"post-223-_i18kqv4r1y80\"><\/a><strong>1. \u0637\u0631\u06cc\u0642\u0647 \u06a9\u0627\u0645\u0646\u062a \u06af\u0630\u0627\u0631\u06cc \u0648 \u0645\u0633\u062a\u0646\u062f \u0633\u0627\u0632\u06cc \u06a9\u062f\u0647\u0627<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p>\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u0627\u0646\u060c \u0637\u06cc \u0686\u0646\u062f \u0633\u0627\u0644 \u06af\u0630\u0634\u062a\u0647 \u062a\u062c\u0631\u0628\u06cc\u0627\u062a \u0628\u0633\u06cc\u0627\u0631 \u0632\u06cc\u0627\u062f\u06cc \u06a9\u0633\u0628 \u06a9\u0631\u062f\u0647 \u0627\u0646\u062f \u0648 \u0628\u0647 \u0627\u06cc\u0646 \u0646\u062a\u06cc\u062c\u0647 \u0631\u0633\u06cc\u062f\u0647 \u0627\u0646\u062f \u06a9\u0647 \u0645\u0641\u06cc\u062f\u062a\u0631\u06cc\u0646 \u0648 \u06a9\u0627\u0631\u0622\u0645\u062f\u062a\u0631\u06cc\u0646 \u0631\u0648\u0634 \u0628\u0631\u0627\u06cc \u0646\u0648\u0634\u062a\u0646 \u0648 \u062e\u0648\u0627\u0646\u062f\u0646 \u06a9\u062f \u0647\u0627\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0627\u0645\u0646\u062a \u062f\u0631 \u06a9\u062f\u0647\u0627 \u0645\u06cc \u0628\u0627\u0634\u062f. \u0628\u0627 \u062f\u0646\u0628\u0627\u0644 \u06a9\u0631\u062f\u0646 \u06cc\u06a9 \u0633\u0631\u06cc \u0627\u0633\u062a\u0627\u0646\u062f\u0627\u0631\u062f \u0647\u0627\u06cc \u0645\u0639\u06cc\u0646 \u0648 \u062e\u0627\u0635\u060c IDE \u0647\u0627 \u0648 \u0628\u0642\u06cc\u0647 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0627\u0632 \u0631\u0648\u0634 \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641\u06cc \u0628\u0631\u0627\u06cc \u06a9\u0627\u0645\u0646\u062a \u06af\u0630\u0627\u0631\u06cc \u06a9\u062f\u0647\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u062f\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f.<\/p>\n<p>\u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u0646\u0638\u0631 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f:<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-2768\" src=\"http:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/commenting-and-documentation.jpeg\" alt=\"\u0637\u0631\u06cc\u0642\u0647 \u06a9\u0627\u0645\u0646\u062a \u06af\u0630\u0627\u0631\u06cc \u0648 \u0645\u0633\u062a\u0646\u062f \u0633\u0627\u0632\u06cc \u06a9\u062f\u0647\u0627\" width=\"850\" height=\"647\" srcset=\"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/commenting-and-documentation.jpeg 850w, https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/commenting-and-documentation-300x228.jpeg 300w, https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/commenting-and-documentation-768x585.jpeg 768w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u062f\u0631 \u06a9\u062f \u0628\u0627\u0644\u0627 \u06cc\u06a9 \u062e\u0637 \u0628\u0639\u062f \u0627\u0632 \u062a\u0639\u0631\u06cc\u0641 \u062a\u0627\u0628\u0639 function \u062c\u0648\u0631\u06cc \u06a9\u0627\u0645\u0646\u062a \u06af\u0630\u0627\u0631\u06cc \u0634\u062f\u0647 \u06a9\u0647 \u0647\u0631 \u0632\u0645\u0627\u0646 \u062f\u0631 \u0647\u0631 \u062c\u0627\u06cc\u06cc \u0627\u0632 \u06a9\u062f \u062a\u0627\u0628\u0639 function \u0648\u0627\u0631\u062f \u0634\u0648\u062f\u060c \u0628\u0637\u0648\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0622\u0646 \u06a9\u0627\u0645\u0646\u062a \u062f\u0631 \u062e\u0637 \u0628\u0639\u062f \u0627\u0632 \u0622\u0646 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0627\u062f\u0647 \u0634\u0648\u062f.<\/p>\n<p>&nbsp;<\/p>\n<p>\u06cc\u06a9 \u0645\u062b\u0627\u0644 \u062f\u06cc\u06af\u0631 \u0628\u0631\u0627\u06cc \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u0627\u0632 \u06a9\u062a\u0627\u0628\u062e\u0627\u0646\u0647 \u0628\u062e\u0634 \u0633\u0648\u0645 :<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-2769\" src=\"http:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/word-image-3.jpeg\" alt=\"\u0634\u06cc\u0648\u0647 \u0635\u062d\u06cc\u062d \u06a9\u0627\u0645\u0646\u062a \u06af\u0630\u0627\u0631\u06cc \u0648 \u0645\u0633\u062a\u0646\u062f \u0633\u0627\u0632\u06cc \u06a9\u062f\u0647\u0627\" width=\"850\" height=\"454\" srcset=\"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/word-image-3.jpeg 850w, https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/word-image-3-300x160.jpeg 300w, https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/word-image-3-768x410.jpeg 768w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u06a9\u0627\u0645\u0646\u062a \u0647\u0627\u06cc \u0645\u0648\u062c\u0648\u062f \u062f\u0631 \u0645\u062b\u0627\u0644 \u0647\u0627\u06cc \u0630\u06a9\u0631 \u0634\u062f\u0647 \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 PHPDoc \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u062f\u0631 \u0645\u062d\u06cc\u0637 \u062a\u0648\u0633\u0639\u0647 \u0628\u0635\u0648\u0631\u062a \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u06cc visual studio code \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647 \u0627\u0646\u062f.<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"post-223-_xkftsvo8xfmy\"><\/a><strong>2. \u062a\u0648\u0631\u0641\u062a\u06af\u06cc \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u06a9\u062f\u0647\u0627 \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0628\u06cc\u0634\u062a\u0631<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p>\u0641\u0627\u0635\u0644\u0647 \u06af\u0630\u0627\u0631\u06cc \u0648 \u062a\u0648\u0631\u0641\u062a\u06af\u06cc \u062a\u0627\u062b\u06cc\u0631 \u0632\u06cc\u0627\u062f\u06cc \u062f\u0631 \u0638\u0627\u0647\u0631 \u0648 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0627\u0631\u062f. \u0628\u0647\u062a\u0631 \u0627\u0633\u062a \u06a9\u0647 \u06cc\u06a9 \u0633\u0628\u06a9 \u062a\u0648\u0631\u0641\u062a\u06af\u06cc \u062b\u0627\u0628\u062a \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f \u0648 \u0641\u0642\u0637 \u0627\u0632 \u0647\u0645\u0627\u0646 \u0633\u0628\u06a9 \u062f\u0631 \u062a\u0645\u0627\u0645 \u06a9\u062f \u0647\u0627\u06cc\u062a\u0627\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>&nbsp;<\/p>\n<p>\u0627\u0633\u062a\u0627\u06cc\u0644 \u0648 \u0631\u0648\u0634 \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641\u06cc \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0648 \u0641\u0631\u0645 \u062f\u0647\u06cc \u062a\u0648\u0631\u0641\u062a\u06af\u06cc \u0647\u0627 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f:<\/p>\n<p>&nbsp;<\/p>\n<p><a id=\"post-223-_h9xn7dnl5d8h\"><\/a><strong>\u0645\u062f\u0644 1:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<pre>function foo() {\r\n    if ($maybe) {\r\n        do_it_now();\r\n        again();\r\n    } else {\r\n        abort_mission();\r\n    }\r\n    finalize();\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><a id=\"post-223-_x26vfmqgh1ic\"><\/a><strong>\u0645\u062f\u0644 2:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<pre>function foo()\r\n{\r\n    if ($maybe)\r\n    {\r\n        do_it_now();\r\n        again();\r\n    }\r\n    else\r\n    {\r\n        abort_mission();\r\n    }\r\n    finalize();\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><a id=\"post-223-_6gmqqsc34zio\"><\/a><strong>\u0645\u062f\u0644 3:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<pre>function foo()\r\n{   if ($maybe)\r\n    {   do_it_now();\r\n        again();\r\n    }\r\n    else\r\n    {   abort_mission();\r\n    }\r\n    finalize();\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0627\u0632 \u0628\u06cc\u0646 \u0627\u06cc\u0646 \u0645\u062f\u0644 \u0647\u0627 \u0646\u0645\u06cc \u062a\u0648\u0627\u0646 \u0647\u06cc\u0686 \u06a9\u062f\u0627\u0645 \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0628\u0647\u062a\u0631\u06cc\u0646 \u0645\u062f\u0644 \u0645\u0639\u0631\u0641\u06cc \u06a9\u0631\u062f \u0648 \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0628\u0627 \u062a\u0648\u062c\u0647 \u0628\u0647 \u0639\u0644\u0627\u06cc\u0642 \u062e\u0648\u062f \u06cc\u06a9\u06cc \u0627\u0632 \u0622\u0646\u0647\u0627 \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f \u0648 \u0647\u0645\u06cc\u0634\u0647 \u0627\u0632 \u0622\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f. \u0627\u06af\u0631 \u0642\u0631\u0627\u0631 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0635\u0648\u0631\u062a \u062a\u06cc\u0645\u06cc \u06a9\u0627\u0631 \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f \u0628\u0627\u06cc\u062f \u0628\u0627 \u0627\u0639\u0636\u0627\u06cc \u062a\u06cc\u0645 \u062e\u0648\u062f \u0628\u0647 \u062a\u0648\u0627\u0641\u0642 \u0628\u0631\u0633\u06cc\u062f \u0648 \u0647\u0645\u06af\u06cc \u0627\u0632 \u06cc\u06a9 \u0646\u0648\u0639 \u0627\u0633\u062a\u0627\u06cc\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.\u0627\u0644\u0628\u062a\u0647 \u06af\u0627\u0647\u06cc \u0627\u0648\u0642\u0627\u062a \u0628\u0646\u0627 \u0628\u0647 \u0646\u0648\u0639 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647\u060c \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u0627\u0646 \u0627\u0632 \u062a\u0631\u06a9\u06cc\u0628 \u062f\u0648 \u0646\u0648\u0639 \u0627\u0633\u062a\u0627\u06cc\u0644 \u0628\u0627 \u0647\u0645 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u06a9\u0646\u0646\u062f.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong>\u0645\u0627\u0646\u0646\u062f \u0627\u0633\u062a\u0627\u06cc\u0644 \u06af\u0644\u0627\u0628\u06cc (PEAR) :<\/strong><\/h4>\n<p>&nbsp;<\/p>\n<pre>function foo()\r\n{                     \/\/ placed on the next line\r\n    if ($maybe) {     \/\/ placed on the same line\r\n        do_it_now();\r\n        again();\r\n    } else {\r\n        abort_mission();\r\n    }\r\n    finalize();\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h2><a id=\"post-223-_56ourq8bwiwf\"><\/a><strong>3. \u062e\u0648\u062f\u062f\u0627\u0631\u06cc \u0627\u0632 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u0646\u062a \u0637\u0648\u0644\u0627\u0646\u06cc \u062f\u0631 \u06a9\u062f\u0647\u0627<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p>\u062f\u0631 \u0635\u0648\u0631\u062a\u06cc \u06a9\u0647 \u0627\u0632 \u0646\u0648\u0634\u062a\u0646 \u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u0645\u0641\u0635\u0644 \u0648 \u0628\u06cc \u0645\u0648\u0631\u062f \u062f\u0631 \u0642\u0633\u0645\u062a \u06a9\u0627\u0645\u0646\u062a \u0647\u0627 \u062e\u0648\u062f\u062f\u0627\u0631\u06cc \u06a9\u0646\u06cc\u062f\u060c \u0648\u062c\u0648\u062f \u06a9\u0627\u0645\u0646\u062a \u0647\u0627 \u062f\u0631 \u06a9\u062f \u0628\u0627\u0639\u062b \u0632\u06cc\u0628\u0627\u06cc\u06cc \u0648 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0622\u0646 \u0645\u06cc\u0634\u0648\u062f.<\/p>\n<p>\u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062a\u0648\u062c\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<p>&nbsp;<\/p>\n<pre>\/\/ get the country code\r\n$country_code = get_country_code($_SERVER['REMOTE_ADDR']);\r\n\r\n\r\n\/\/ if country code is US\r\nif ($country_code == 'US') {\r\n\r\n\r\n\u00a0\u00a0\u00a0\u00a0\/\/ display the form input for state\r\n\u00a0\u00a0\u00a0\u00a0echo form_input_state();\r\n}\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u0645\u06cc \u0628\u06cc\u0646\u06cc\u062f \u06a9\u0627\u0645\u0646\u062a \u06af\u0630\u0627\u0634\u062a\u0646 \u0628\u0631\u0627\u06cc \u0642\u0637\u0639\u0647 \u06a9\u062f\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u06a9\u0627\u0631 \u0622\u0646\u0647\u0627 \u0645\u0634\u062e\u0635 \u0648 \u0648\u0627\u0636\u062d \u0627\u0633\u062a\u060c \u06cc\u06a9 \u06a9\u0627\u0631 \u0628\u06cc\u0647\u0648\u062f\u0647 \u0627\u0633\u062a \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0641\u0642\u0637 \u06a9\u0627\u0641\u06cc\u0633\u062a \u06a9\u0647 \u06cc\u06a9 \u062c\u0645\u0644\u0647 \u062e\u0644\u0627\u0635\u0647 \u0648 \u062e\u0648\u0627\u0646\u0627 \u062f\u0631 \u0645\u0648\u0631\u062f \u06a9\u0627\u0631 \u0622\u0646 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u062f\u0631 \u062e\u0637 \u0628\u0627\u0644\u0627\u06cc \u0622\u0646 \u0628\u06af\u0630\u0627\u0631\u06cc\u062f:<\/p>\n<p>&nbsp;<\/p>\n<pre>\/\/ display state selection for US users\r\n$country_code = get_country_code($_SERVER['REMOTE_ADDR']);\r\nif ($country_code == 'US') {\r\n    echo form_input_state();\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h2><a id=\"post-223-_egm38rjo61ex\"><\/a><strong>4. \u06af\u0631\u0648\u0647 \u0628\u0646\u062f\u06cc \u06a9\u062f\u0647\u0627 \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0628\u06cc\u0634\u062a\u0631\u00a0<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p>\u0645\u0639\u0645\u0648\u0644\u0627 \u0648\u0638\u0627\u06cc\u0641 \u062e\u0627\u0635 \u0646\u06cc\u0627\u0632\u0645\u0646\u062f \u06a9\u062f\u0647\u0627\u06cc \u06a9\u0645\u06cc \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0645\u0648\u0642\u0639 \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u0628\u0647\u062a\u0631 \u0627\u0633\u062a \u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0635\u0648\u0631\u062a \u0628\u0644\u0627\u06a9 \u0647\u0627\u06cc \u062c\u062f\u0627\u06af\u0627\u0646\u0647 \u0628\u0647 \u0647\u0645\u0631\u0627\u0647 \u0641\u0627\u0635\u0644\u0647 \u06af\u0630\u0627\u0631\u06cc \u0645\u0646\u0627\u0633\u0628 \u0648\u0627\u0631\u062f \u0648 \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u0645.<\/p>\n<p>\u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062a\u0648\u062c\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<p>&nbsp;<\/p>\n<pre>\/\/ get list of forums\r\n$forums = array();\r\n$r = mysql_query(\"SELECT id, name, description FROM forums\");\r\nwhile ($d = mysql_fetch_assoc($r)) {\r\n    $forums []= $d;\r\n}\r\n \r\n\/\/ load the templates\r\nload_template('header');\r\nload_template('forum_list',$forums);\r\nload_template('footer');\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0648\u0642\u062a\u06cc \u0642\u0628\u0644 \u0627\u0632 \u0634\u0631\u0648\u0639 \u0647\u0631 \u0628\u0644\u0627\u06a9 \u0627\u0632 \u06a9\u0627\u0645\u0646\u062a \u0647\u0627\u06cc \u06a9\u0648\u062a\u0627\u0647 \u0648 \u0645\u062e\u062a\u0635\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f\u060c \u0639\u0644\u0627\u0648\u0647 \u0628\u0631 \u0627\u06cc\u0646\u06a9\u0647 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0622\u0646 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0631\u0627 \u0628\u06cc\u0634\u062a\u0631 \u062e\u0648\u0627\u0647\u062f \u06a9\u0631\u062f \u0628\u0644\u06a9\u0647 \u0628\u0644\u0627\u06a9 \u0647\u0627 \u0631\u0627 \u0646\u06cc\u0632 \u0627\u0632 \u0647\u0645 \u062c\u062f\u0627 \u0648 \u0645\u062a\u0645\u0627\u06cc\u0632 \u0645\u06cc\u06a9\u0646\u062f.<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"post-223-_wn6dg4w6d3o9\"><\/a><strong>5. \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u0628\u0647 \u0635\u0648\u0631\u062a \u06cc\u06a9 \u0645\u062f\u0644 \u062b\u0627\u0628\u062a<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p>\u0627\u06af\u0631 \u0628\u0647 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u062a\u0648\u062c\u0647 \u06a9\u0646\u06cc\u062f \u0645\u062a\u0648\u062c\u0647 \u0645\u06cc\u0634\u0648\u06cc\u062f \u06a9\u0647 \u062f\u0631 \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u0628\u0647 \u0632\u0628\u0627\u0646 php\u060c \u0628\u0631\u0627\u06cc \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u0627\u0632 \u06cc\u06a9 \u0637\u0631\u062d \u062b\u0627\u0628\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u06cc\u0634\u0648\u062f:<\/p>\n<p>&nbsp;<\/p>\n<p><strong>()strpos() vs. str_split<\/strong><\/p>\n<p><strong>()imagetypes() vs. image_type_to_extension<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u0647\u0646\u06af\u0627\u0645 \u0634\u0631\u0648\u0639 \u06a9\u062f \u0646\u0648\u06cc\u0633\u06cc\u060c \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633 \u0628\u0631\u0627\u06cc \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u0647\u0627 \u0628\u0627\u06cc\u062f \u0627\u0632 \u06cc\u06a9 \u0645\u062a\u062f \u06cc\u0627 \u0627\u0644\u06af\u0648 \u0627\u0633\u062a\u0627\u0646\u062f\u0627\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u062f. \u0627\u0646\u0648\u0627\u0639 \u0645\u062e\u062a\u0644\u0641\u06cc \u0627\u0632 \u0627\u06cc\u0646 \u0627\u0644\u06af\u0648 \u0647\u0627 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f \u06a9\u0647 \u062f\u0648 \u062a\u0627 \u0627\u0632 \u0645\u0634\u0647\u0648\u0631\u062a\u0631\u06cc\u0646 \u0648 \u0627\u0633\u062a\u0627\u0646\u062f\u0627\u0631\u062f\u062a\u0631\u06cc\u0646 \u0622\u0646\u0647\u0627 \u062f\u0648 \u0631\u0648\u0634 \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/p>\n<p>&nbsp;<\/p>\n<h4>camelCase:<\/h4>\n<p>&nbsp;<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0631\u0648\u0634 \u06a9\u0644\u0645\u0647 \u0627\u0648\u0644 \u0628\u0627 \u062d\u0631\u0641 \u06a9\u0648\u0686\u06a9 \u0634\u0631\u0648\u0639 \u0645\u06cc\u0634\u0648\u062f \u0648 \u0628\u0642\u06cc\u0647 \u06a9\u0644\u0645\u0647 \u0647\u0627\u06cc \u0628\u0639\u062f\u06cc \u0627\u0632 \u0628\u0627 \u062d\u0631\u0641 \u0628\u0632\u0631\u06af \u0634\u0631\u0648\u0639 \u0645\u06cc\u0634\u0648\u0646\u062f.<\/p>\n<p>\u0645\u062b\u0644 : ()parseRawImageData<\/p>\n<p>&nbsp;<\/p>\n<h4>underscores:<\/h4>\n<p>&nbsp;<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0631\u0648\u0634 \u062a\u0645\u0627\u0645 \u06a9\u0644\u0645\u0627\u062a \u0628\u0627 \u062d\u0631\u0641 \u06a9\u0648\u0686\u06a9 \u0634\u0631\u0648\u0639 \u0645\u06cc\u0634\u0648\u0646\u062f \u0648 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 _ \u0627\u0632 \u0647\u0645 \u062c\u062f\u0627 \u0645\u06cc\u0634\u0648\u0646\u062f.<\/p>\n<p>\u0645\u062b\u0644 : ()mysql_real_escape_string<\/p>\n<p>&nbsp;<\/p>\n<p>\u0627\u06af\u0631 \u062f\u0631 \u062d\u0627\u0644 \u062d\u0627\u0636\u0631 \u067e\u0631\u0648\u0698\u0647 \u0627\u06cc\u06cc \u062f\u0627\u0631\u06cc\u062f \u06a9\u0647 \u0627\u0632 \u06cc\u06a9 \u0642\u0627\u0639\u062f\u0647 \u062e\u0627\u0635 \u0628\u0631\u0627\u06cc \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f\u060c \u0634\u0645\u0627 \u0647\u0645 \u0628\u0627\u06cc\u062f \u0628\u0627 \u0647\u0645\u0627\u0646 \u0642\u0627\u0639\u062f\u0647 \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u0631\u0627 \u0627\u062f\u0627\u0645\u0647 \u062f\u0647\u06cc\u062f.<\/p>\n<p>\u0645\u0639\u0645\u0648\u0644\u0627 \u0628\u0639\u0636\u06cc \u0627\u0632 \u067e\u0644\u062a\u0641\u0631\u0645 \u0647\u0627\u06cc \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\u060c \u0645\u0627\u06cc\u0644 \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0647\u0646\u06af\u0627\u0645 \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u0627\u0632 \u06cc\u06a9 \u0645\u062f\u0644 \u062b\u0627\u0628\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0646\u062f. \u0628\u0631\u0627\u06cc \u0645\u062b\u0627\u0644 \u062f\u0631 \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u0628\u0647 \u0632\u0628\u0627\u0646 java \u0628\u06cc\u0634\u062a\u0631 \u0627\u0632 \u0631\u0648\u0634 camelCase \u0628\u0631\u0627\u06cc \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u0646\u062f \u062f\u0631 \u062d\u0627\u0644\u06cc \u06a9\u0647 \u062f\u0631 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc PHP \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u0647\u0627 \u0627\u0632 \u0631\u0648\u0634 underscores \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc\u0634\u0648\u0646\u062f.<\/p>\n<p>&nbsp;<\/p>\n<p>\u062a\u0648\u062c\u0647 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u0627\u06cc\u0646 \u0631\u0648\u0634 \u0647\u0627 \u0645\u06cc\u062a\u0648\u0627\u0646\u0646\u062f \u0628\u0627 \u0647\u0645 \u0645\u06cc\u06a9\u0633 \u0634\u0648\u0646\u062f \u0628\u0631\u0627\u06cc \u0645\u062b\u0627\u0644 \u0628\u0639\u0636\u06cc \u0627\u0632 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u0627\u0646 \u0628\u0627 \u062a\u0648\u062c\u0647 \u0628\u0647 \u0646\u0648\u0639 \u067e\u0631\u0648\u0698\u0647 \u062e\u0648\u062f \u062a\u0631\u062c\u06cc\u062d \u0645\u06cc\u062f\u0647\u0646\u062f \u0627\u0632 \u0631\u0648\u0634 underscores \u0628\u0631\u0627\u06cc \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u062a\u0648\u0627\u0628\u0639 \u0648 \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0646\u062f \u0648 \u0627\u0632 \u0631\u0648\u0634 camelCase \u0628\u0631\u0627\u06cc \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u0645\u062a\u062f \u0647\u0627\u06cc \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0646\u062f:<\/p>\n<p>&nbsp;<\/p>\n<pre>class Foo_Bar {\r\n \r\n    public function someDummyMethod() {\r\n \r\n    }\r\n \r\n}\r\n \r\nfunction procedural_function_name() {\r\n \r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0648\u0631\u062f \u0647\u0645 \u0646\u0645\u06cc \u062a\u0648\u0627\u0646 \u06af\u0641\u062a \u06a9\u0647 \u0628\u0647\u062a\u0631\u06cc\u0646 \u0631\u0648\u0634 \u0648 \u0627\u0633\u062a\u0627\u06cc\u0644 \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u06a9\u062f\u0627\u0645 \u0627\u0633\u062a. \u0641\u0631\u0642\u06cc \u0646\u0645\u06cc\u06a9\u0646\u062f \u06a9\u0647 \u0627\u0632 \u06a9\u062f\u0627\u0645 \u0646\u0648\u0639 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u0634\u0648\u062f.\u0628\u0647 \u06cc\u0627\u062f \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u062a\u0627 \u0627\u0646\u062a\u0647\u0627\u06cc \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0627\u0632 \u06cc\u06a9 \u0645\u062f\u0644 \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f.<\/p>\n<p>&nbsp;<\/p>\n<h2><a id=\"post-223-_gbs4rlggnzbb\"><\/a><strong>6. \u0642\u0627\u0639\u062f\u0647 DRY \u062f\u0631 \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc\u00a0<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p>\u0648\u0627\u0698\u0647 DRY \u0645\u062e\u0641\u0641 \u0639\u0628\u0627\u0631\u062a (Don\u2019t Repeat Yourself) \u0628\u0647 \u0645\u0639\u0646\u06cc\u201d \u062e\u0648\u062f\u062a \u062a\u06a9\u0631\u0627\u0631 \u0646\u06a9\u0646\u201d \u0627\u0633\u062a \u06a9\u0647 \u0628\u0639\u0646\u0648\u0627\u0646 DIE \u0645\u062e\u0641\u0641 \u0639\u0628\u0627\u0631\u062a (Duplication is Evil) \u0628\u0647 \u0645\u0639\u0646\u06cc \u06a9\u067e\u06cc \u0628\u0631\u062f\u0627\u0631\u06cc \u0645\u0636\u0631 \u0627\u0633\u062a\u060c \u0634\u0646\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a.<\/p>\n<p>\u06cc\u06a9\u06cc \u0627\u0632 \u0647\u062f\u0641 \u0647\u0627\u06cc \u0645\u0647\u0645 \u06a9\u0627\u0645\u067e\u06cc\u0648\u062a\u0631 \u0648 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627 \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u06a9\u0627\u0631\u0647\u0627 \u0648 \u062a\u0633\u06a9 \u0647\u0627 \u06cc \u062a\u06a9\u0631\u0627\u0631\u06cc \u0628\u0637\u0648\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0627\u0646\u062c\u0627\u0645 \u0634\u0648\u0646\u062f \u06a9\u0647 \u0627\u06cc\u0646 \u0642\u0627\u0639\u062f\u0647 \u0648 \u0627\u0635\u0644 \u0645\u0647\u0645 \u0628\u0627\u06cc\u062f \u062f\u0631 \u062a\u0645\u0627\u0645 \u06a9\u062f\u0647\u0627 \u0648 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u062a\u062d\u062a \u0648\u0628 \u062d\u0641\u0638 \u0648 \u0628\u0631\u0642\u0631\u0627\u0631 \u0634\u0648\u062f \u0648 \u06cc\u06a9 \u0642\u0637\u0639\u0647 \u06a9\u062f \u062a\u06a9\u0631\u0627\u0631\u06cc \u0646\u0628\u0627\u06cc\u062f \u0686\u0646\u062f\u06cc\u0646 \u0648 \u0686\u0646\u062f \u0628\u0627\u0631 \u062f\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u062a\u06a9\u0631\u0627\u0631 \u0634\u0648\u062f.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0645\u062b\u0627\u0644 \u0628\u06cc\u0634\u062a\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u062a\u062d\u062a \u0648\u0628 \u0635\u0641\u062d\u0627\u062a \u0632\u06cc\u0627\u062f\u06cc \u062f\u0627\u0631\u0646\u062f \u06a9\u0647 \u062f\u0631 \u0622\u0646\u0647\u0627 \u0639\u0646\u0627\u0635\u0631 \u0645\u0634\u062a\u0631\u06a9 \u0632\u06cc\u0627\u062f\u06cc \u0645\u062b\u0644 \u0647\u062f\u0631\u0647\u0627 \u0648 \u0641\u0648\u062a\u0631\u0647\u0627 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f. \u06a9\u067e\u06cc-\u067e\u06cc\u0633\u062a \u06a9\u0631\u062f\u0646 \u0622\u0646\u0647\u0627 \u062f\u0631 \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0627\u062a \u0627\u06cc\u062f\u0647 \u0645\u0646\u0627\u0633\u0628\u06cc \u0646\u06cc\u0633\u062a.\u0628\u0647 \u062c\u0627\u06cc \u06a9\u067e\u06cc-\u067e\u06cc\u0633\u062a \u06a9\u0631\u062f\u0646 \u062a\u0648\u0635\u06cc\u0647 \u0645\u06cc\u0634\u0648\u062f \u06a9\u0647 \u06a9\u062f \u0647\u0627\u06cc \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u0647\u062f\u0631 \u0648 \u0641\u0648\u062a\u0631 \u0631\u0627 \u062f\u0631 \u0633\u0648\u0631\u0633 \u0641\u0627\u06cc\u0644 \u0647\u0627\u06cc \u062c\u062f\u0627\u06af\u0627\u0646\u0647 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f \u0648 \u0647\u0631 \u062c\u0627 \u06a9\u0647 \u0628\u0647 \u0622\u0646\u0647\u0627 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0634\u062a\u0647 \u062f\u0627\u0634\u062a\u06cc\u062f \u0628\u0647 \u0631\u0627\u062d\u062a\u06cc \u0628\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647 \u0627\u0646\u0647\u0627 \u062f\u0633\u062a\u0631\u0633\u06cc \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>&nbsp;<\/p>\n<pre>$this-&gt;load-&gt;view('includes\/header');\r\n \r\n$this-&gt;load-&gt;view($main_content);\r\n \r\n$this-&gt;load-&gt;view('includes\/footer');\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>7. \u062e\u0648\u062f\u062f\u0627\u0631\u06cc \u0627\u0632 \u0627\u06cc\u062c\u0627\u062f \u062a\u0648\u062f\u0631\u062a\u0648\u06cc\u06cc \u0647\u0627\u06cc \u0639\u0645\u06cc\u0642 \u062f\u0631 \u06a9\u062f<\/h3>\n<p>&nbsp;<\/p>\n<p>\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0632\u06cc\u0627\u062f \u0627\u0632 \u0633\u0637\u0648\u062d \u062a\u0648\u062f\u0631\u062a\u0648 \u06a9\u0627\u0631 \u062e\u0648\u0627\u0646\u062f\u0646 \u0648 \u062f\u0646\u0628\u0627\u0644 \u06a9\u0631\u062f\u0646 \u06a9\u062f\u0647\u0627 \u0631\u0627 \u0633\u062e\u062a \u062a\u0631 \u0645\u06cc\u06a9\u0646\u062f.<\/p>\n<p>&nbsp;<\/p>\n<pre>function do_stuff() {\r\n \r\n\/\/ ...\r\n \r\n    if (is_writable($folder)) {\r\n \r\n        if ($fp = fopen($file_path,'w')) {\r\n \r\n            if ($stuff = get_some_stuff()) {\r\n \r\n                if (fwrite($fp,$stuff)) {\r\n \r\n                    \/\/ ...\r\n \r\n                } else {\r\n                    return false;\r\n                }\r\n            } else {\r\n                return false;\r\n            }\r\n        } else {\r\n            return false;\r\n        }\r\n    } else {\r\n        return false;\r\n    }\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0628\u06cc\u0634\u062a\u0631\u060c \u0645\u06cc \u062a\u0648\u0627\u0646 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a\u06cc \u0645\u062b\u0644 \u06a9\u0645 \u06a9\u0631\u062f\u0646 \u0633\u0637\u0648\u062d \u062a\u0648\u062f\u0631\u062a\u0648 \u062f\u0631 \u06a9\u062f\u0647\u0627 \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f.<\/p>\n<p>&nbsp;<\/p>\n<pre>function do_stuff() {\r\n \r\n\/\/ ...\r\n \r\n    if (!is_writable($folder)) {\r\n        return false;\r\n    }\r\n \r\n    if (!$fp = fopen($file_path,'w')) {\r\n        return false;\r\n    }\r\n \r\n    if (!$stuff = get_some_stuff()) {\r\n        return false;\r\n    }\r\n \r\n    if (fwrite($fp,$stuff)) {\r\n        \/\/ ...\r\n    } else {\r\n        return false;\r\n    }\r\n}\r\n<\/pre>\n<h3><\/h3>\n<h3><a id=\"post-223-_rktcr4l2eria\"><\/a><strong>8. \u0645\u062d\u062f\u0648\u062f\u0633\u0627\u0632\u06cc \u0637\u0648\u0644 \u062e\u0637 \u0647\u0627 \u06a9\u062f \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p>\u0627\u06af\u0631 \u062f\u0642\u062a \u06a9\u0631\u062f\u0647 \u0628\u0627\u0634\u06cc\u062f \u0645\u0642\u0627\u0644\u0627\u062a \u0645\u0648\u062c\u0648\u062f \u062f\u0631 \u0645\u062c\u0644\u0647 \u0648 \u0631\u0648\u0632\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u0627\u0646\u06af\u0644\u06cc\u0633\u06cc\u060c \u062f\u0631 \u0642\u0627\u0644\u0628 \u0633\u062a\u0648\u0646 \u0647\u0627\u06cc \u0628\u0627\u0631\u06cc\u06a9 \u0648 \u0628\u0644\u0646\u062f \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647 \u0627\u0646\u062f \u06a9\u0647 \u0627\u06cc\u0646 \u0646\u0648\u0639 \u0686\u06cc\u062f\u0645\u0627\u0646 \u0628\u0627\u0639\u062b \u0645\u06cc\u0634\u0648\u062f \u06a9\u0647 \u0645\u0627 \u0631\u0627\u062d\u062a \u062a\u0631 \u0628\u062a\u0648\u0627\u0646\u06cc\u0645 \u0645\u0637\u0627\u0644\u0628 \u0631\u0627 \u0628\u0628\u06cc\u0646\u06cc\u0645 \u0648 \u0628\u062e\u0648\u0627\u0646\u06cc\u0645:<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-2770\" src=\"http:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/unnamed-file.jpeg\" alt=\"\u0645\u062d\u062f\u0648\u062f\u0633\u0627\u0632\u06cc \u0637\u0648\u0644 \u062e\u0637 \u0647\u0627 \u06a9\u062f \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\" width=\"300\" height=\"221\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u067e\u0633 \u0628\u0647 \u06cc\u0627\u062f \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u06a9\u062f \u0647\u0627\u06cc \u062e\u0648\u062f \u0631\u0627 \u0628\u0635\u0648\u0631\u062a \u0627\u0641\u0642\u06cc \u0648 \u062f\u0631 \u062e\u0637\u0648\u0637 \u0637\u0648\u0644\u0627\u0646\u06cc \u0646\u0646\u0648\u06cc\u0633\u06cc\u062f.\u0627\u06af\u0631 \u0642\u0631\u0627\u0631 \u0627\u0633\u062a \u06a9\u0647 \u06a9\u062f\u0647\u0627 \u062f\u0631 \u06cc\u06a9 \u067e\u0646\u062c\u0631\u0647 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u062e\u0648\u0627\u0646\u062f\u0647 \u0634\u0648\u0646\u062f\u060c \u0628\u0647\u062a\u0631 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u0647\u0631 \u062e\u0637 \u062d\u062f\u0627\u06a9\u062b\u0631 \u0627\u0632 80 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f.<\/p>\n<p>&nbsp;<\/p>\n<pre>\/\/ bad\r\n$my_email-&gt;set_from('test@email.com')-&gt;add_to('programming@gmail.com')-&gt;set_subject('Methods Chained')-&gt;set_body('Some long message')-&gt;send();\r\n \r\n\/\/ good\r\n$my_email\r\n    -&gt;set_from('test@email.com')\r\n    -&gt;add_to('programming@gmail.com')\r\n    -&gt;set_subject('Methods Chained')\r\n    -&gt;set_body('Some long message')\r\n    -&gt;send();\r\n \r\n\/\/ bad\r\n$query = \"SELECT id, username, first_name, last_name, status FROM users LEFT JOIN user_posts USING(users.id, user_posts.user_id) WHERE post_id = '123'\";\r\n \r\n\/\/ good\r\n$query = \"SELECT id, username, first_name, last_name, status\r\n    FROM users\r\n    LEFT JOIN user_posts USING(users.id, user_posts.user_id)\r\n    WHERE post_id = '123'\";\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3><a id=\"post-223-_ifjdo32bkfbv\"><\/a><strong>9. \u0633\u0627\u0632\u0645\u0627\u0646\u062f\u0647\u06cc \u0641\u0627\u06cc\u0644 \u0648 \u067e\u0648\u0634\u0647 \u0647\u0627<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p>\u0627\u0632 \u0646\u0638\u0631 \u0641\u0646\u06cc\u060c \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u06a9\u062f \u0646\u0648\u06cc\u0633\u06cc \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0641\u0642\u0637 \u062f\u0631 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f. \u0627\u0645\u0627 \u062e\u0648\u0627\u0646\u062f\u0646 \u0648 \u0646\u06af\u0647\u062f\u0627\u0631\u06cc \u0622\u0646 \u06a9\u062f\u0647\u0627 \u0628\u0631\u0627\u06cc \u0634\u0645\u0627 \u0628\u0633\u06cc\u0627\u0631 \u062f\u0634\u0648\u0627\u0631 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f.<\/p>\n<p>\u0627\u0632 \u0627\u06cc\u0646 \u0631\u0648 \u0628\u0631\u0627\u06cc \u06a9\u0646\u062a\u0631\u0644 \u0628\u0647\u062a\u0631\u060c \u062f\u0633\u062a\u0631\u0633\u06cc \u0622\u0633\u0627\u0646\u062a\u0631 \u0648 \u0631\u0627\u062d\u062a \u062a\u0631 \u062e\u0648\u0627\u0646\u062f\u0646 \u06a9\u062f \u0647\u0627 \u0628\u0647\u062a\u0631 \u0627\u0633\u062a \u06a9\u0647 \u06cc\u06a9 \u067e\u0648\u0634\u0647 \u0628\u0633\u0627\u0632\u06cc\u062f \u0648 \u0628\u0627 \u062a\u0648\u062c\u0647 \u0628\u0647 \u0646\u06cc\u0627\u0632 \u0648 \u06a9\u062f\u0647\u0627\u06cc\u062a\u0627\u0646 \u0641\u0627\u06cc\u0644 \u0647\u0627\u06cc\u06cc \u0628\u0631\u0627\u06cc \u0646\u06af\u0647 \u062f\u0627\u0631\u06cc \u06a9\u062f\u0647\u0627\u06cc \u0645\u0631\u0628\u0648\u0637\u0647 \u062f\u0631 \u0622\u0646 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"post-223-_q8xktvgab1ow\"><\/a><strong>10. \u0646\u0627\u0645 \u0647\u0627\u06cc \u0645\u0648\u0642\u062a \u062b\u0627\u0628\u062a<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p>\u0628\u0637\u0648\u0631 \u06a9\u0644\u06cc \u0645\u062a\u063a\u06cc\u0631\u0647\u0627 \u0628\u0627\u06cc\u062f \u0642\u0627\u0628\u0644 \u062a\u0648\u0635\u06cc\u0641 \u0648 \u0634\u0627\u0645\u0644 \u06cc\u06a9 \u06cc\u0627 \u0686\u0646\u062f \u06a9\u0644\u0645\u0647 \u0628\u0627\u0634\u0646\u062f. \u0627\u0645\u0627 \u0645\u062a\u063a\u06cc\u0631\u0647\u0627\u06cc \u0645\u0648\u0642\u062a\u06cc \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0627\u06cc\u0646 \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627 \u0646\u062f\u0627\u0631\u0646\u062f \u0648 \u0645\u06cc \u062a\u0648\u0627\u0646\u0646\u062f \u0628\u0647 \u0627\u0646\u062f\u0627\u0632\u0647 \u06cc\u06a9 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u06a9\u0648\u062a\u0627\u0647 \u0628\u0627\u0634\u0646\u062f.<\/p>\n<p>\u06cc\u06a9 \u0631\u0648\u0634 \u0628\u0633\u06cc\u0627\u0631 \u062e\u0648\u0628 \u062f\u06cc\u06af\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0646\u0627\u0645 \u0647\u0627\u06cc \u062b\u0627\u0628\u062a \u0628\u0631\u0627\u06cc \u0645\u062a\u063a\u06cc\u0631\u0647\u0627\u06cc \u062b\u0627\u0628\u062a\u06cc \u0627\u0633\u062a \u06a9\u0647 \u06cc\u06a9 \u0646\u0648\u0639 \u0646\u0642\u0634 \u062f\u0627\u0631\u0646\u062f. \u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062a\u0648\u062c\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<p>&nbsp;<\/p>\n<pre>\/\/ $i for loop counters\r\nfor ($i = 0; $i &lt; 100; $i++) {\r\n \r\n    \/\/ $j for the nested loop counters\r\n    for ($j = 0; $j &lt; 100; $j++) { } } \/\/ $ret for return variables function foo() { $ret['bar'] = get_bar(); $ret['stuff'] = get_stuff(); return $ret; } \/\/ $k and $v in foreach foreach ($some_array as $k =&gt; $v) {\r\n \r\n}\r\n \r\n\/\/ $q, $r and $d for mysql\r\n$q = \"SELECT * FROM table\";\r\n$r = mysql_query($q);\r\nwhile ($d = mysql_fetch_assocr($r)) {\r\n \r\n}\r\n \r\n\/\/ $fp for file pointers\r\n$fp = fopen('file.txt','w');\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h2><a id=\"post-223-_ywunxl4dfaqj\"><\/a><strong>11. \u0646\u0648\u0634\u062a\u0646 \u06a9\u0644\u0645\u0627\u062a \u062e\u0627\u0635 SQL \u0628\u0627 \u062d\u0631\u0648\u0641 \u0628\u0632\u0631\u06af<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p>\u062a\u0639\u0627\u0645\u0644 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647\u060c \u0645\u0647\u0645\u062a\u0631\u06cc\u0646 \u0628\u062e\u0634 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u062a\u062d\u062a \u0648\u0628 \u0627\u0633\u062a.\u0627\u06af\u0631 \u06cc\u06a9 \u0633\u0631\u06cc \u06a9\u0648\u0626\u0631\u06cc \u0647\u0627\u06cc SQL \u062e\u0627\u0645 \u0646\u0648\u0634\u062a\u0647 \u0627\u06cc\u062f\u060c \u067e\u06cc\u0634\u0646\u0647\u0627\u062f \u0645\u06cc\u0634\u0648\u062f \u06a9\u0647 \u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0642\u0627\u0628\u0644 \u062e\u0648\u0627\u0646\u062f\u0646 \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f \u0648 \u0646\u0627\u0645 \u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0627 \u062d\u0631\u0648\u0641 \u0628\u0632\u0631\u06af \u0628\u0646\u0648\u06cc\u0633\u06cc\u062f. \u0628\u0627 \u0627\u06cc\u0646\u06a9\u0647 \u06a9\u0644\u0645\u0627\u062a \u062e\u0627\u0635 \u0648 \u0646\u0627\u0645 \u0647\u0627\u06cc \u062a\u0648\u0627\u0628\u0639 SQL \u0645\u0648\u0627\u0631\u062f \u062d\u0633\u0627\u0633\u06cc \u0646\u06cc\u0633\u062a\u0646\u062f\u060c \u0627\u0645\u0627 \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0627 \u062d\u0631\u0648\u0641 \u0628\u0632\u0631\u06af \u0628\u0646\u0648\u06cc\u0633\u062f \u062a\u0627 \u0627\u0632 \u0646\u0627\u0645 \u062c\u062f\u0648\u0644 \u0648 \u0633\u062a\u0648\u0646 \u0647\u0627 \u062c\u062f\u0627 \u0634\u0648\u0646\u062f.<\/p>\n<p>&nbsp;<\/p>\n<pre>SELECT id, username FROM user;\r\n \r\nUPDATE user SET last_login = NOW()\r\nWHERE id = '123'\r\n \r\nSELECT id, username FROM user u\r\nLEFT JOIN user_address ua ON(u.id = ua.user_id)\r\nWHERE ua.state = 'NY'\r\nGROUP BY u.id\r\nORDER BY u.username\r\nLIMIT 0,20\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h2><a id=\"post-223-_9q9hdki0flgg\"><\/a><strong>12. \u062c\u062f\u0627\u0633\u0627\u0632\u06cc \u06a9\u062f \u0648 \u062f\u0627\u062f\u0647 \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631 \u06a9\u062f<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p>\u0627\u06cc\u0646 \u0631\u0648\u0634 \u06cc\u06a9 \u0627\u0635\u0644 \u0648 \u0642\u0627\u0639\u062f\u0647 \u062f\u06cc\u06af\u0631 \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc \u06a9\u062f\u0647\u0627\u0633\u062a \u06a9\u0647 \u0645\u06cc\u062a\u0648\u0627\u0646 \u0622\u0646 \u0631\u0627 \u0628\u0631 \u0631\u0648\u06cc \u062a\u0645\u0627\u0645 \u0632\u0628\u0627\u0646 \u0647\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0648 \u0647\u0645\u0647 \u0645\u062d\u06cc\u0637 \u0647\u0627 \u0627\u0639\u0645\u0627\u0644 \u06a9\u0631\u062f.<\/p>\n<p>\u0645\u0639\u0645\u0648\u0644\u0627 \u0648\u0627\u0698\u0647 data \u06cc\u0627 \u062f\u0627\u062f\u0647 \u062f\u0631 \u0632\u0645\u06cc\u0646\u0647 \u062a\u0648\u0633\u0639\u0647 \u0648\u0628\u060c \u0628\u0647 \u0645\u0639\u0646\u06cc \u062e\u0631\u0648\u062c\u06cc HTML \u0627\u0633\u062a.<\/p>\n<p>\u0633\u0627\u0644 \u0647\u0627 \u067e\u06cc\u0634 \u0648\u0642\u062a\u06cc \u06a9\u0647 php \u0628\u0631\u0627\u06cc \u0627\u0648\u0644\u06cc\u0646 \u0628\u0627\u0631 \u0645\u0646\u062a\u0634\u0631 \u0634\u062f\u060c \u062f\u0631 \u0627\u0628\u062a\u062f\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u0645\u0648\u062a\u0648\u0631 \u0627\u0644\u06af\u0648 \u0634\u0646\u0627\u062e\u062a\u0647 \u0634\u062f\u0647.<\/p>\n<p>\u062f\u0627\u0634\u062a\u0646 \u0641\u0627\u06cc\u0644 \u0647\u0627\u06cc \u0628\u0632\u0631\u06af HTML \u06a9\u0647 \u062f\u0631 \u0628\u06cc\u0646 \u0622\u0646 \u0686\u0646\u062f \u062e\u0637 \u06a9\u062f php \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f\u060c \u06cc\u06a9 \u06a9\u0627\u0631 \u0645\u0639\u0645\u0648\u0644\u06cc \u0628\u0648\u062f. \u062f\u0631 \u062d\u0627\u0644\u06cc \u06a9\u0647 \u0628\u0639\u062f \u0627\u0632 \u0633\u0627\u0644\u0647\u0627 \u0647\u0645\u0647 \u0686\u06cc\u0632 \u062a\u063a\u06cc\u06cc\u0631 \u06a9\u0631\u062f \u0648<a href=\"http:\/\/rabsana.ir\/blog\/professional-website-deigning\/\" target=\"_blank\" rel=\"noopener\"> \u0648\u0628 \u0633\u0627\u06cc\u062a \u0647\u0627 \u067e\u0648\u06cc\u0627\u062a\u0631 \u0648 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u062a\u0631<\/a> \u0634\u062f\u0646\u062f.\u0627\u06a9\u0646\u0648\u0646 \u06a9\u062f\u060c \u06cc\u06a9 \u0628\u062e\u0634 \u0639\u0638\u06cc\u0645 \u0627\u0632 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u062a\u062d\u062a \u0648\u0628 \u0627\u0633\u062a \u0648 \u062f\u06cc\u06af\u0631 \u0627\u06cc\u0646 \u0631\u0648\u0634 \u062e\u0648\u0628\u06cc \u0628\u0631\u0627\u06cc \u062a\u0631\u06a9\u06cc\u0628 \u0622\u0646 \u0628\u0627 HTML \u0646\u06cc\u0633\u062a.<\/p>\n<p>\u0634\u0645\u0627 \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u06cc\u0646 \u0627\u0635\u0644 \u0648 \u0642\u0627\u0639\u062f\u0647 \u0631\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u062e\u0648\u062f \u067e\u06cc\u0627\u062f\u0647 \u0633\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f \u0648 \u06cc\u0627 \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u06cc\u06a9 \u0627\u0628\u0632\u0627\u0631 \u0633\u0647 \u0637\u0631\u0641\u0647 (third-party) \u06a9\u0647 \u0634\u0627\u0645\u0644 \u0645\u0648\u062a\u0648\u0631\u0647\u0627\u06cc \u0627\u0644\u06af\u0648\u060c <a href=\"http:\/\/rabsana.ir\/tutorials\/difference-between-react-and-angular-framework\/\" target=\"_blank\" rel=\"noopener\">\u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9<\/a> \u0647\u0627 \u06cc\u0627 <a href=\"https:\/\/rabsana.ir\/blog\/best-and-most-popular-cms-platforms\/\">CMS<\/a> \u0647\u0627 \u0627\u0633\u062a \u06a9\u0647 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0647\u0627\u06cc \u0622\u0646\u0647\u0627 \u0631\u0627 \u062f\u0646\u0628\u0627\u0644 \u0645\u06cc\u06a9\u0646\u062f.<\/p>\n<p>&nbsp;<\/p>\n<h2><a id=\"post-223-_2czscsmwoz7v\"><\/a><strong>13. \u062c\u0627 \u0628\u0647 \u062c\u0627\u06cc\u06cc syntax \u0647\u0627 \u062f\u0631 \u062f\u0627\u062e\u0644 \u0627\u0644\u06af\u0648\u0647\u0627<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p>\u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0634\u0645\u0627 \u0627\u0632 \u06cc\u06a9 \u0645\u0648\u062a\u0648\u0631 \u0627\u0644\u06af\u0648 \u0641\u0627\u0646\u062a\u0632\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u06a9\u0646\u06cc\u062f \u0648 \u0628\u0647 \u062c\u0627\u06cc \u0622\u0646 \u0628\u0627 php \u062f\u0631\u0648\u0646 \u062e\u0637\u06cc \u0633\u0627\u062f\u0647 \u062f\u0631 \u0641\u0627\u06cc\u0644 \u0647\u0627\u06cc\u062a\u0627\u0646 \u0627\u062f\u0627\u0645\u0647 \u062f\u0647\u06cc\u062f. \u0627\u06cc\u0646 \u0644\u0632\u0648\u0645\u0627 \u201c\u062c\u062f\u0627\u0633\u0627\u0632\u06cc \u06a9\u062f \u0648 \u062f\u0627\u062f\u0647\u201d \u0631\u0627 \u0646\u0642\u0636 \u0646\u0645\u06cc \u06a9\u0646\u062f \u0628\u0647 \u0634\u0631\u0637\u06cc \u06a9\u0647 \u06a9\u062f \u062f\u0631\u0648\u0646 \u062e\u0637\u06cc \u0645\u0633\u062a\u0642\u06cc\u0645\u0627 \u0628\u0627 \u062e\u0631\u0648\u062c\u06cc \u0627\u0631\u062a\u0628\u0627\u0637 \u062f\u0627\u0631\u062f \u0648 \u0642\u0627\u0628\u0644 \u062e\u0648\u0627\u0646\u062f\u0646 \u0627\u0633\u062a. \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0648\u0631\u062f \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0627\u0632 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u06a9\u0631\u062f\u0646 syntax \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a\u0627\u0631\u0647\u0627\u06cc \u06a9\u0646\u062a\u0631\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>&nbsp;<\/p>\n<div class=\"line number1 index0 alt2\" style=\"text-align: left;\"><code class=\"php plain\">&lt;div <\/code><code class=\"php keyword\">class<\/code><code class=\"php plain\">=<\/code><code class=\"php string\">\"user_controls\"<\/code><code class=\"php plain\">&gt;<\/code><\/div>\n<div class=\"line number2 index1 alt1\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;?php <\/code><code class=\"php keyword\">if<\/code> <code class=\"php plain\">(<\/code><code class=\"php variable\">$user<\/code> <code class=\"php plain\">= Current_User::user()): ?&gt;<\/code><\/div>\n<div class=\"line number3 index2 alt2\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">Hello, &lt;em&gt;&lt;?php <\/code><code class=\"php functions\">echo<\/code> <code class=\"php variable\">$user<\/code><code class=\"php plain\">-&gt;username; ?&gt;&lt;\/em&gt; &lt;br\/&gt;<\/code><\/div>\n<div class=\"line number4 index3 alt1\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;?php <\/code><code class=\"php functions\">echo<\/code> <code class=\"php plain\">anchor(<\/code><code class=\"php string\">'logout'<\/code><code class=\"php plain\">, <\/code><code class=\"php string\">'Logout'<\/code><code class=\"php plain\">); ?&gt;<\/code><\/div>\n<div class=\"line number5 index4 alt2\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;?php <\/code><code class=\"php keyword\">else<\/code><code class=\"php plain\">: ?&gt;<\/code><\/div>\n<div class=\"line number6 index5 alt1\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;?php <\/code><code class=\"php functions\">echo<\/code> <code class=\"php plain\">anchor(<\/code><code class=\"php string\">'login'<\/code><code class=\"php plain\">,<\/code><code class=\"php string\">'Login'<\/code><code class=\"php plain\">); ?&gt; |<\/code><\/div>\n<div class=\"line number7 index6 alt2\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;?php <\/code><code class=\"php functions\">echo<\/code> <code class=\"php plain\">anchor(<\/code><code class=\"php string\">'signup'<\/code><code class=\"php plain\">, <\/code><code class=\"php string\">'Register'<\/code><code class=\"php plain\">); ?&gt;<\/code><\/div>\n<div class=\"line number8 index7 alt1\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;?php <\/code><code class=\"php keyword\">endif<\/code><code class=\"php plain\">; ?&gt;<\/code><\/div>\n<div class=\"line number9 index8 alt2\" style=\"text-align: left;\"><code class=\"php plain\">&lt;\/div&gt;<\/code><\/div>\n<div class=\"line number10 index9 alt1\" style=\"text-align: left;\"><\/div>\n<div class=\"line number11 index10 alt2\" style=\"text-align: left;\"><code class=\"php plain\">&lt;h1&gt;My Message Board&lt;\/h1&gt;<\/code><\/div>\n<div class=\"line number12 index11 alt1\" style=\"text-align: left;\"><\/div>\n<div class=\"line number13 index12 alt2\" style=\"text-align: left;\"><code class=\"php plain\">&lt;?php <\/code><code class=\"php keyword\">foreach<\/code><code class=\"php plain\">(<\/code><code class=\"php variable\">$categories<\/code> <code class=\"php keyword\">as<\/code> <code class=\"php variable\">$category<\/code><code class=\"php plain\">): ?&gt;<\/code><\/div>\n<div class=\"line number14 index13 alt1\" style=\"text-align: left;\"><\/div>\n<div class=\"line number15 index14 alt2\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;div <\/code><code class=\"php keyword\">class<\/code><code class=\"php plain\">=<\/code><code class=\"php string\">\"category\"<\/code><code class=\"php plain\">&gt;<\/code><\/div>\n<div class=\"line number16 index15 alt1\" style=\"text-align: left;\"><\/div>\n<div class=\"line number17 index16 alt2\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;h2&gt;&lt;?php <\/code><code class=\"php functions\">echo<\/code> <code class=\"php variable\">$category<\/code><code class=\"php plain\">-&gt;title; ?&gt;&lt;\/h2&gt;<\/code><\/div>\n<div class=\"line number18 index17 alt1\" style=\"text-align: left;\"><\/div>\n<div class=\"line number19 index18 alt2\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;?php <\/code><code class=\"php keyword\">foreach<\/code><code class=\"php plain\">(<\/code><code class=\"php variable\">$category<\/code><code class=\"php plain\">-&gt;Forums <\/code><code class=\"php keyword\">as<\/code> <code class=\"php variable\">$forum<\/code><code class=\"php plain\">): ?&gt;<\/code><\/div>\n<div class=\"line number20 index19 alt1\" style=\"text-align: left;\"><\/div>\n<div class=\"line number21 index20 alt2\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;div <\/code><code class=\"php keyword\">class<\/code><code class=\"php plain\">=<\/code><code class=\"php string\">\"forum\"<\/code><code class=\"php plain\">&gt;<\/code><\/div>\n<div class=\"line number22 index21 alt1\" style=\"text-align: left;\"><\/div>\n<div class=\"line number23 index22 alt2\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;h3&gt;<\/code><\/div>\n<div class=\"line number24 index23 alt1\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;?php <\/code><code class=\"php functions\">echo<\/code> <code class=\"php plain\">anchor(<\/code><code class=\"php string\">'forums\/'<\/code><code class=\"php plain\">.<\/code><code class=\"php variable\">$forum<\/code><code class=\"php plain\">-&gt;id, <\/code><code class=\"php variable\">$forum<\/code><code class=\"php plain\">-&gt;title) ?&gt;<\/code><\/div>\n<div class=\"line number25 index24 alt2\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">(&lt;?php <\/code><code class=\"php functions\">echo<\/code> <code class=\"php variable\">$forum<\/code><code class=\"php plain\">-&gt;Threads-&gt;<\/code><code class=\"php functions\">count<\/code><code class=\"php plain\">(); ?&gt; threads)<\/code><\/div>\n<div class=\"line number26 index25 alt1\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;\/h3&gt;<\/code><\/div>\n<div class=\"line number27 index26 alt2\" style=\"text-align: left;\"><\/div>\n<div class=\"line number28 index27 alt1\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;div <\/code><code class=\"php keyword\">class<\/code><code class=\"php plain\">=<\/code><code class=\"php string\">\"description\"<\/code><code class=\"php plain\">&gt;<\/code><\/div>\n<div class=\"line number29 index28 alt2\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;?php <\/code><code class=\"php functions\">echo<\/code> <code class=\"php variable\">$forum<\/code><code class=\"php plain\">-&gt;description; ?&gt;<\/code><\/div>\n<div class=\"line number30 index29 alt1\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;\/div&gt;<\/code><\/div>\n<div class=\"line number31 index30 alt2\" style=\"text-align: left;\"><\/div>\n<div class=\"line number32 index31 alt1\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;\/div&gt;<\/code><\/div>\n<div class=\"line number33 index32 alt2\" style=\"text-align: left;\"><\/div>\n<div class=\"line number34 index33 alt1\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;?php <\/code><code class=\"php keyword\">endforeach<\/code><code class=\"php plain\">; ?&gt;<\/code><\/div>\n<div class=\"line number35 index34 alt2\" style=\"text-align: left;\"><\/div>\n<div class=\"line number36 index35 alt1\" style=\"text-align: left;\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">&lt;\/div&gt;<\/code><\/div>\n<div class=\"line number37 index36 alt2\" style=\"text-align: left;\"><\/div>\n<div class=\"line number38 index37 alt1\" style=\"text-align: left;\"><code class=\"php plain\">&lt;?php <\/code><code class=\"php keyword\">endforeach<\/code><code class=\"php plain\">; ?&gt;<\/code><\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<p>\u0628\u0627 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0632\u06cc\u0627\u062f \u0627\u0632 \u067e\u0631\u0627\u0646\u062a\u0632 \u0647\u0627 \u0631\u0627 \u06a9\u0645 \u06a9\u0646\u06cc\u062f \u0648 \u0631\u0648\u0634 \u0627\u0631 \u0645\u062b\u0644 \u0633\u0627\u062e\u062a\u0627\u0631 \u0648 \u062a\u0648\u0631\u0641\u062a\u06af\u06cc HTML \u0627\u0633\u062a.<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"post-223-_vvejezym59mb\"><\/a><strong>14. Object-Oriented vs. Procedural<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p>\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u0628\u0647 \u0634\u0645\u0627 \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a\u0646 well-structured \u06a9\u0645\u06a9 \u0645\u06cc\u06a9\u0646\u062f. \u0627\u0645\u0627 \u0627\u06cc\u0646 \u0628\u062f\u06cc\u0646 \u0645\u0639\u0646\u0627 \u0646\u06cc\u0633\u062a \u06a9\u0647 \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0628\u0647 \u0637\u0648\u0631 \u06a9\u0644\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc procedural \u0631\u0627 \u06a9\u0646\u0627\u0631 \u0628\u06af\u0630\u0627\u0631\u06cc\u062f.\u062f\u0631 \u0648\u0627\u0642\u0639 \u062a\u0631\u06a9\u06cc\u0628 \u0627\u06cc\u0646 \u062f\u0648 \u0645\u062f\u0644 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0645\u0641\u06cc\u062f \u0628\u0627\u0634\u062f.<\/p>\n<p>\u0645\u0639\u0645\u0648\u0644\u0627 \u062f\u0631 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647\u060c \u0627\u0632 \u0634\u06cc \u0647\u0627 \u0628\u0631\u0627\u06cc \u0646\u0645\u0627\u06cc\u0634 \u062f\u0627\u062f\u0647 \u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f .<\/p>\n<p>&nbsp;<\/p>\n<pre>class User {\r\n \r\n    public $username;\r\n    public $first_name;\r\n    public $last_name;\r\n    public $email;\r\n \r\n    public function __construct() {\r\n        \/\/ ...\r\n    }\r\n \r\n    public function create() {\r\n        \/\/ ...\r\n    }\r\n \r\n    public function save() {\r\n        \/\/ ...\r\n    }\r\n \r\n    public function delete() {\r\n        \/\/ ...\r\n    }\r\n \r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0627\u0645\u06a9\u0627\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062a\u0648\u0627\u0628\u0639 Procedural \u0628\u0631\u0627\u06cc \u0648\u0638\u0627\u06cc\u0641 \u062e\u0627\u0635\u06cc \u06a9\u0647 \u0645\u06cc\u062a\u0648\u0627\u0646\u0646\u062f \u0628\u0637\u0648\u0631 \u0645\u0633\u062a\u0642\u0644 \u0627\u0646\u062c\u0627\u0645 \u0634\u0648\u0646\u062f\u060c \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f.<\/p>\n<p>&nbsp;<\/p>\n<pre>function capitalize($string) {\r\n \r\n    $ret = strtoupper($string[0]);\r\n    $ret .= strtolower(substr($string,1));\r\n    return $ret;\r\n \r\n}\r\n<\/pre>\n<h3><a id=\"post-223-_acmnykept4a4\"><\/a><strong>15. \u062e\u0648\u0627\u0646\u062f\u0646 \u06a9\u062f \u0647\u0627\u06cc \u0645\u062a\u0646 \u0628\u0627\u0632<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/rabsana.ir\/blog\/open-source-programs-and-application\/\" target=\"_blank\" rel=\"noopener\">\u067e\u0631\u0648\u0698\u0647 \u0647\u0627\u06cc \u0645\u062a\u0646 \u0628\u0627\u0632<\/a> \u062a\u0648\u0633\u0637 \u0648\u0631\u0648\u062f\u06cc \u0647\u0627\u06cc \u062a\u0639\u062f\u0627\u062f \u0632\u06cc\u0627\u062f\u06cc \u0627\u0632 \u062a\u0648\u0633\u0639\u0647 \u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0633\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u0627\u0646\u062f.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0647 \u0642\u0627\u0628\u0644\u06cc\u062a \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u062f\u0631 \u067e\u0631\u0648\u0698\u0647 \u0647\u0627 \u062d\u0641\u0638 \u0634\u0648\u062f\u060c \u0627\u0639\u0636\u0627\u06cc \u062a\u06cc\u0645 \u0645\u06cc\u062a\u0648\u0627\u0646\u0646\u062f \u062a\u0627 \u062c\u0627\u06cc\u06cc \u06a9\u0647 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0628\u0627 \u0647\u0645 \u06a9\u0627\u0631 \u06a9\u0646\u0646\u062f.<\/p>\n<p>\u0627\u0632 \u0627\u06cc\u0646 \u0631\u0648 \u060c \u0645\u0631\u0648\u0631 \u0633\u0648\u0631\u0633 \u06a9\u062f \u067e\u0631\u0648\u0698\u0647 \u06cc\u06a9 \u0627\u06cc\u062f\u0647 \u062e\u0648\u0628 \u0628\u0631\u0627\u06cc \u0645\u0634\u0627\u0647\u062f\u0647 \u06a9\u0627\u0631\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u062a\u0648\u0633\u0637 \u062a\u0648\u0633\u0639\u0647 \u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u062f\u0631 \u067e\u0631\u0648\u0698\u0647 \u0627\u0646\u062c\u0627\u0645 \u0634\u062f\u0647 \u0645\u06cc\u0628\u0627\u0634\u062f.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-2771\" src=\"http:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/word-image-9.png\" alt=\"\u062e\u0648\u0627\u0646\u062f\u0646 \u06a9\u062f \u0647\u0627\u06cc \u0645\u062a\u0646 \u0628\u0627\u0632\" width=\"580\" height=\"980\" srcset=\"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/word-image-9.png 580w, https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/word-image-9-178x300.png 178w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2><a id=\"post-223-_5mduo0x3zj7p\"><\/a><strong>16. \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0646\u0627\u0645 \u0647\u0627\u06cc \u0645\u0639\u0646\u06cc \u062f\u0627\u0631 \u0628\u0631\u0627\u06cc \u0645\u062a\u063a\u06cc\u0631\u0647\u0627 \u0648 \u062a\u0648\u0627\u0628\u0639<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p>\u0627\u06af\u0631 \u0634\u0645\u0627 \u0627\u0632 \u0646\u0627\u0645 \u0647\u0627\u06cc \u0645\u0639\u0646\u06cc \u062f\u0627\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u0642\u0637\u0639\u0627 \u062f\u0631 \u0632\u0645\u0627\u0646 \u062e\u0648\u062f \u0635\u0631\u0641\u0647 \u062c\u0648\u06cc\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u06a9\u0631\u062f.<\/p>\n<p>\u0634\u0627\u06cc\u062f \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0634\u0645\u0627 \u0641\u0642\u0637 10 \u06cc\u0627 12 \u062e\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u06cc\u06a9\u0646\u06cc\u062f \u0627\u06cc\u0646 \u0645\u0648\u0636\u0648\u0639 \u062e\u06cc\u0644\u06cc \u0647\u0645 \u0645\u0647\u0645 \u0628\u0647 \u0646\u0638\u0631 \u0646\u06cc\u0627\u06cc\u062f \u0627\u0645\u0627 \u0628\u0631\u0627\u06cc \u06a9\u062f \u0646\u0648\u06cc\u0633\u06cc \u0647\u0627\u06cc \u0637\u0648\u0644\u0627\u0646\u06cc \u0628\u0633\u06cc\u0627\u0631 \u06af\u06cc\u062c \u06a9\u0646\u0646\u062f\u0647 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f. \u0647\u0645\u0686\u0646\u06cc\u0646 \u0628\u0627 \u06af\u0630\u0627\u0634\u062a\u0646 \u0627\u0633\u0645 \u06a9\u0648\u062a\u0627\u0647 \u0628\u0631\u0627\u06cc \u0645\u062a\u063a\u06cc\u0631\u0647\u0627 \u0648 \u062a\u0648\u0627\u0628\u0639 \u062f\u0631 \u0632\u0645\u0627\u0646 \u062e\u0648\u062f \u0635\u0631\u0641\u0647 \u062c\u0648\u06cc\u06cc \u06a9\u0631\u062f\u0647 \u0627\u06cc\u062f.<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"post-223-_hucct8wgtxgh\"><\/a><strong>17. \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u06a9\u0631\u062f\u0646 \u0627\u0632 \u0627\u0639\u062f\u0627\u062f \u062c\u0627\u062f\u0648\u06cc\u06cc \u062f\u0631 \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p>\u0645\u0646\u0638\u0648\u0631 \u0627\u0632 \u0627\u0639\u062f\u0627\u062f \u062c\u0627\u062f\u0648\u06cc\u06cc \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u0642\u062f\u0627\u0631 \u0639\u062f\u062f\u06cc hard-coded \u062f\u0631 \u06a9\u062f \u0627\u0633\u062a. \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0647\u0646\u06af\u0627\u0645 \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0686\u0646\u06cc\u0646 \u0639\u062f\u062f \u0647\u0627\u06cc\u06cc \u0628\u0631\u0627\u06cc \u0634\u0645\u0627 \u0627\u0645\u0631\u06cc \u0645\u0646\u0637\u0642\u06cc \u0628\u0627\u0634\u062f. \u062f\u0631 \u062d\u0627\u0644\u06cc \u06a9\u0647 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0634\u0645\u0627 \u06cc\u0627 \u0647\u0631 \u0634\u062e\u0635 \u062f\u06cc\u06af\u0631\u06cc \u0628\u0637\u0648\u0631 \u0647\u0645\u0632\u0645\u0627\u0646 \u0628\u0647 \u06cc\u06a9 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0646\u06af\u0627\u0647 \u06a9\u0646\u06cc\u062f \u0648 \u0628\u0647 \u0633\u062e\u062a\u06cc \u0645\u062a\u0648\u062c\u0647 \u0634\u0648\u06cc\u062f \u06a9\u0647 \u062f\u0631 \u0622\u06cc\u0646\u062f\u0647 \u0627\u06cc\u0646 \u0634\u0645\u0627\u0631\u0647 \u0642\u0631\u0627\u0631 \u0627\u0633\u062a \u0686\u0647 \u06a9\u0627\u0631\u06cc \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u062f.<\/p>\n<p>&nbsp;<\/p>\n<div class=\"line number1 index0 alt2\" dir=\"ltr\"><code class=\"php plain\">&lt;?php<\/code><\/div>\n<div class=\"line number2 index1 alt1\" dir=\"ltr\"><\/div>\n<div class=\"line number3 index2 alt2\" dir=\"ltr\"><code class=\"php keyword\">while<\/code><code class=\"php plain\">(<\/code><code class=\"php variable\">$egg_count<\/code> <code class=\"php plain\">&gt; 400) {<\/code><\/div>\n<div class=\"line number4 index3 alt1\" dir=\"ltr\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php comments\">\/\/ Do something<\/code><\/div>\n<div class=\"line number5 index4 alt2\" dir=\"ltr\"><code class=\"php plain\">}<\/code><\/div>\n<div class=\"line number6 index5 alt1\" dir=\"ltr\"><\/div>\n<div class=\"line number7 index6 alt2\" dir=\"ltr\"><code class=\"php variable\">$container_capacity<\/code> <code class=\"php plain\">= 400;<\/code><\/div>\n<div class=\"line number8 index7 alt1\" dir=\"ltr\"><code class=\"php keyword\">while<\/code><code class=\"php plain\">(<\/code><code class=\"php variable\">$egg_count<\/code> <code class=\"php plain\">&gt; <\/code><code class=\"php variable\">$container_capacity<\/code><code class=\"php plain\">) {<\/code><\/div>\n<div class=\"line number9 index8 alt2\" dir=\"ltr\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php comments\">\/\/ Do Something<\/code><\/div>\n<div class=\"line number10 index9 alt1\" dir=\"ltr\"><code class=\"php plain\">}<\/code><\/div>\n<div class=\"line number11 index10 alt2\" dir=\"ltr\"><code class=\"php plain\">?&gt;<\/code><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u0628\u0647 \u06a9\u062f \u0628\u0627\u0644\u0627 \u062a\u0648\u062c\u0647 \u06a9\u0646\u06cc\u062f. \u062f\u0631 \u0642\u0633\u0645\u062a \u0627\u0648\u0644 \u06a9\u062f \u0645\u0627 \u0646\u0645\u06cc \u0641\u0647\u0645\u06cc\u0645 \u06a9\u0647 \u0639\u062f\u062f 400 \u062a\u0639\u062f\u0627\u062f \u0686\u0647 \u0686\u06cc\u0632\u06cc \u0631\u0627 \u0646\u0634\u0627\u0646 \u0645\u06cc\u062f\u0647\u062f.\u0622\u06cc\u0627 \u0645\u0646\u0638\u0648\u0631 \u0622\u0646 \u062a\u0639\u062f\u0627\u062f \u0627\u0641\u0631\u0627\u062f\u06cc \u0627\u0633\u062a \u06a9\u0647 \u062a\u062e\u0645 \u0645\u0631\u063a \u0633\u0631\u0648 \u0645\u06cc\u06a9\u0646\u0646\u062f \u06cc\u0627 \u0686\u06cc\u0632 \u062f\u06cc\u06af\u0631\u06cc \u0627\u0633\u062a\u061f \u0627\u0632 \u0633\u0648\u06cc \u062f\u06cc\u06af\u0631 \u0645\u0627 \u0628\u0637\u0648\u0631 \u06a9\u0627\u0645\u0644 \u0648 \u0648\u0627\u0636\u062d \u0645\u06cc\u062f\u0627\u0646\u06cc\u0645 \u06a9\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u060c \u062f\u0631 \u062d\u0627\u0644 \u0628\u0631\u0631\u0633\u06cc \u0627\u06cc\u0646 \u0647\u0633\u062a\u06cc\u0645 \u06a9\u0647 \u0627\u06af\u0631 \u062a\u0639\u062f\u0627\u062f \u062a\u062e\u0645 \u0645\u0631\u063a \u0628\u06cc\u0634\u062a\u0631 \u0627\u0632 \u0638\u0631\u0641\u06cc\u062a <a href=\"https:\/\/rabsana.ir\/tutorials\/docker-and-kubernetes-virtualization\/\">\u06a9\u0627\u0646\u062a\u06cc\u0646\u0631 \u0647\u0627<\/a> \u0634\u062f \u0686\u0647 \u06a9\u0627\u0631\u06cc \u0627\u0646\u062c\u0627\u0645 \u0634\u0648\u062f.<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"post-223-_b0sw5bpesrha\"><\/a><strong>18. \u06a9\u062f\u0647\u0627\u06cc \u0642\u0627\u0628\u0644 \u0628\u0627\u0632\u0633\u0627\u0632\u06cc<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p>\u0639\u0645\u0644 \u0628\u0627\u0632\u0633\u0627\u0632\u06cc (refactoring) \u06cc\u0639\u0646\u06cc \u0627\u0639\u0645\u0627\u0644 \u06cc\u06a9 \u0633\u0631\u06cc \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0628\u0631 \u0631\u0648\u06cc \u06a9\u062f\u0647\u0627\u060c \u0628\u062f\u0648\u0646 \u0627\u06cc\u0646\u06a9\u0647 \u06a9\u0647 \u0639\u0645\u0644\u06a9\u0631\u062f \u0622\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0648 \u06a9\u062f \u062a\u063a\u06cc\u06cc\u0631 \u06a9\u0646\u062f. \u0628\u0627\u0632\u0633\u0627\u0632\u06cc \u06a9\u062f \u0647\u0627 \u0634\u0627\u0645\u0644 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a\u06cc \u0645\u062b\u0644 \u0631\u0641\u0639 \u0627\u0634\u06a9\u0627\u0644\u0627\u062a \u06cc\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06cc \u062c\u062f\u06cc\u062f \u0628\u0647 \u06a9\u062f \u0646\u0645\u06cc\u0634\u0648\u062f \u0627\u0632 \u0627\u06cc\u0646 \u0631\u0648 \u0628\u0647 \u0645\u0646\u0638\u0648\u0631 \u0628\u0647\u0628\u0648\u062f \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0648 \u06a9\u06cc\u0641\u06cc\u062a\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u201ccleanup\u201d \u0628\u0628\u06cc\u0646\u06cc\u062f.<\/p>\n<p>\u06a9\u062f \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0627\u0632 \u06cc\u06a9\u00a0 \u0631\u0648\u0632 \u0642\u0628\u0644 \u0646\u0648\u0634\u062a\u0647 \u0627\u06cc\u062f \u062f\u0631 \u0630\u0647\u0646 \u0634\u0645\u0627 \u062a\u0627\u0632\u0647 \u0647\u0633\u062a\u0646\u062f \u0648 \u0634\u0645\u0627 \u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0647 \u06cc\u0627\u062f \u062f\u0627\u0631\u06cc\u062f \u0648 \u0645\u06cc \u062f\u0627\u0646\u06cc\u062f \u0645\u0646\u0638\u0648\u0631 \u0627\u0632 \u0647\u0631 \u0627\u0633\u0645 \u0648 \u0647\u0631 \u062e\u0637 \u06a9\u062f \u0686\u06cc\u0633\u062a \u0648 \u0647\u0646\u0648\u0632 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0648 \u062e\u0648\u0627\u0646\u062f\u0646 \u0647\u0633\u062a\u0646\u062f \u0628\u0647 \u0647\u0645\u06cc\u0646 \u062f\u0644\u06cc\u0644 \u0628\u0647 \u0631\u0627\u062d\u062a\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0627\u0632\u0633\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f. \u0627\u0645\u0627 \u0648\u0642\u062a\u06cc \u062f\u0648 \u0645\u0627\u0647 \u0627\u0632 \u0646\u0648\u0634\u062a\u0646 \u0622\u0646 \u06a9\u062f \u0628\u06af\u0630\u0631\u062f\u060c \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0647\u0646\u06af\u0627\u0645 \u0627\u0646\u062c\u0627\u0645 \u067e\u0631\u0648\u0633\u0647 \u0628\u0627\u0632\u0633\u0627\u0632\u06cc \u0628\u0647 \u0645\u0634\u06a9\u0644 \u0628\u0631 \u0628\u062e\u0648\u0631\u06cc\u062f \u0648 \u0645\u0646\u0638\u0648\u0631 \u0628\u0639\u0636\u06cc \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0631\u0627 \u0628\u0647 \u06cc\u0627\u062f \u0645\u06cc\u0627\u0631\u06cc\u062f \u067e\u0633 \u0628\u0647\u062a\u0631 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647\u062a\u0631\u06cc\u0646 \u0631\u0648\u0634 \u0647\u0627\u06cc \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f \u0631\u0627 \u062f\u0631 \u062d\u06cc\u0646 \u06a9\u062f \u0646\u0648\u06cc\u0633\u06cc \u0627\u0646\u062c\u0627\u0645 \u0628\u062f\u0647\u06cc\u062f.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u060c \u0646\u0642\u0634 \u062e\u06cc\u0644\u06cc \u0645\u0647\u0645\u06cc \u062f\u0631 \u0628\u062d\u062b \u062a\u0648\u0633\u0639\u0647 \u0648 \u067e\u06cc\u0634\u0631\u0641\u062a \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627 \u062f\u0627\u0631\u062f. &nbsp; &nbsp; \u0627\u0632 \u0622\u0646\u062c\u0627\u06cc\u06cc \u06a9\u0647 \u062e\u0648\u0627\u0646\u0627 \u0628\u0648\u062f\u0646 \u06a9\u062f \u0647\u0627 \u06cc\u06a9 \u0645\u0648\u0636\u0648\u0639 \u06af\u0633\u062a\u0631\u062f\u0647 \u0645\u062d\u0633\u0648\u0628 \u0645\u06cc \u0634\u0648\u062f\u060c \u0627\u0631\u0632\u0634 \u0627\u06cc\u0646 \u0631\u0627 \u062f\u0627\u0631\u062f \u06a9\u0647 \u0647\u0646\u06af\u0627\u0645 \u0627\u0646\u062c\u0627\u0645 \u067e\u0631\u0648\u0698\u0647 \u0628\u0635\u0648\u0631\u062a \u062a\u06a9\u06cc \u0648 \u06cc\u0627 \u062a\u06cc\u0645\u06cc \u0648 \u062d\u062a\u06cc \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0628\u0627 \u067e\u0631\u0648\u0698\u0647 \u0647\u0627\u06cc \u0645\u062a\u0646 \u0628\u0627\u0632 \u06cc\u0627 \u0627\u0648\u067e\u0646 \u0633\u0648\u0631\u0633 \u0633\u0631\u0648\u06a9\u0627\u0631 \u062f\u0627\u0631\u06cc\u062f\u060c &hellip;<\/p>\n","protected":false},"author":4,"featured_media":2303,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[73],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v18.4 (Yoast SEO v18.6) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>18 \u0631\u0648\u0634 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc | \u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627<\/title>\n<meta name=\"description\" content=\"\u0686\u06af\u0648\u0646\u0647 \u06a9\u062f \u062e\u0648\u0627\u0646\u0627 \u0628\u0646\u0648\u06cc\u0633\u06cc\u0645\u061f18 \u0631\u0648\u0634 \u06a9\u0647 \u0628\u0627\u0639\u062b \u0628\u0627\u0644\u0627 \u0631\u0641\u062a\u0646 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u06cc\u0634\u0648\u062f | \u0631\u0648\u0634 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u0646\u0648\u0634\u062a\u0646 \u06a9\u062f \u062a\u0645\u06cc\u0632 \u0648 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0628\u06cc\u0634\u062a\u0631\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/\" \/>\n<meta property=\"og:locale\" content=\"fa_IR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"18 \u0631\u0648\u0634 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\" \/>\n<meta property=\"og:description\" content=\"\u0686\u06af\u0648\u0646\u0647 \u06a9\u062f \u062e\u0648\u0627\u0646\u0627 \u0628\u0646\u0648\u06cc\u0633\u06cc\u0645\u061f18 \u0631\u0648\u0634 \u06a9\u0647 \u0628\u0627\u0639\u062b \u0628\u0627\u0644\u0627 \u0631\u0641\u062a\u0646 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u06cc\u0634\u0648\u062f | \u0631\u0648\u0634 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u0646\u0648\u0634\u062a\u0646 \u06a9\u062f \u062a\u0645\u06cc\u0632 \u0648 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0628\u06cc\u0634\u062a\u0631\" \/>\n<meta property=\"og:url\" content=\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-03T07:01:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-31T05:14:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/Best-Practices-for-Writing-Super-Readable-Code.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"360\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u0645\u0647\u0633\u0627 \u0645\u062d\u0645\u062f\u06cc\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 \u062f\u0642\u06cc\u0642\u0647\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b\",\"name\":\"bagher rezvan\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#personlogo\",\"inLanguage\":\"fa-IR\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/43c698432e5f8e000d945d3945e15b50?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/43c698432e5f8e000d945d3945e15b50?s=96&d=mm&r=g\",\"caption\":\"bagher rezvan\"},\"logo\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#personlogo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#website\",\"url\":\"https:\/\/rabsana.ir\/tutorials\/\",\"name\":\"\u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627\",\"description\":\"\u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u062a\u062e\u0635\u0635\u06cc \u0634\u0631\u06a9\u062a \u0637\u0631\u0627\u062d\u06cc \u0633\u0627\u06cc\u062a \u0631\u0627\u0628\u0633\u0627\u0646\u0627\",\"publisher\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rabsana.ir\/tutorials\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fa-IR\"},{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#primaryimage\",\"inLanguage\":\"fa-IR\",\"url\":\"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/Best-Practices-for-Writing-Super-Readable-Code.jpg\",\"contentUrl\":\"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/Best-Practices-for-Writing-Super-Readable-Code.jpg\",\"width\":1200,\"height\":360,\"caption\":\"\u0686\u0637\u0648\u0631 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u06a9\u062f \u062d\u0631\u0641\u0647 \u0627\u06cc \u0648\u062e\u0648\u0627\u0646\u0627 \u0628\u0646\u0648\u06cc\u0633\u0645\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#webpage\",\"url\":\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/\",\"name\":\"18 \u0631\u0648\u0634 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc | \u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627\",\"isPartOf\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#primaryimage\"},\"datePublished\":\"2021-05-03T07:01:47+00:00\",\"dateModified\":\"2021-10-31T05:14:26+00:00\",\"description\":\"\u0686\u06af\u0648\u0646\u0647 \u06a9\u062f \u062e\u0648\u0627\u0646\u0627 \u0628\u0646\u0648\u06cc\u0633\u06cc\u0645\u061f18 \u0631\u0648\u0634 \u06a9\u0647 \u0628\u0627\u0639\u062b \u0628\u0627\u0644\u0627 \u0631\u0641\u062a\u0646 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u06cc\u0634\u0648\u062f | \u0631\u0648\u0634 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u0646\u0648\u0634\u062a\u0646 \u06a9\u062f \u062a\u0645\u06cc\u0632 \u0648 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0628\u06cc\u0634\u062a\u0631\",\"breadcrumb\":{\"@id\":\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#breadcrumb\"},\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u062e\u0627\u0646\u0647\",\"item\":\"https:\/\/rabsana.ir\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"18 \u0631\u0648\u0634 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\"}]},{\"@type\":\"Article\",\"@id\":\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#webpage\"},\"author\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/f95a0ac81e3ccf2f7b115822a7a815cd\"},\"headline\":\"18 \u0631\u0648\u0634 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\",\"datePublished\":\"2021-05-03T07:01:47+00:00\",\"dateModified\":\"2021-10-31T05:14:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#webpage\"},\"wordCount\":153,\"publisher\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b\"},\"image\":{\"@id\":\"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/Best-Practices-for-Writing-Super-Readable-Code.jpg\",\"articleSection\":[\"\u0622\u062e\u0631\u06cc\u0646 \u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc \u0647\u0627\u06cc \u06a9\u0627\u0645\u067e\u06cc\u0648\u062a\u0631\"],\"inLanguage\":\"fa-IR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/f95a0ac81e3ccf2f7b115822a7a815cd\",\"name\":\"\u0645\u0647\u0633\u0627 \u0645\u062d\u0645\u062f\u06cc\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#personlogo\",\"inLanguage\":\"fa-IR\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0910931d9fb93b2b6b0627aa03c9f1c6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0910931d9fb93b2b6b0627aa03c9f1c6?s=96&d=mm&r=g\",\"caption\":\"\u0645\u0647\u0633\u0627 \u0645\u062d\u0645\u062f\u06cc\"},\"url\":\"https:\/\/rabsana.ir\/tutorials\/author\/mahsa-mhmdi\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"18 \u0631\u0648\u0634 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc | \u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627","description":"\u0686\u06af\u0648\u0646\u0647 \u06a9\u062f \u062e\u0648\u0627\u0646\u0627 \u0628\u0646\u0648\u06cc\u0633\u06cc\u0645\u061f18 \u0631\u0648\u0634 \u06a9\u0647 \u0628\u0627\u0639\u062b \u0628\u0627\u0644\u0627 \u0631\u0641\u062a\u0646 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u06cc\u0634\u0648\u062f | \u0631\u0648\u0634 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u0646\u0648\u0634\u062a\u0646 \u06a9\u062f \u062a\u0645\u06cc\u0632 \u0648 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0628\u06cc\u0634\u062a\u0631","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/","og_locale":"fa_IR","og_type":"article","og_title":"18 \u0631\u0648\u0634 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc","og_description":"\u0686\u06af\u0648\u0646\u0647 \u06a9\u062f \u062e\u0648\u0627\u0646\u0627 \u0628\u0646\u0648\u06cc\u0633\u06cc\u0645\u061f18 \u0631\u0648\u0634 \u06a9\u0647 \u0628\u0627\u0639\u062b \u0628\u0627\u0644\u0627 \u0631\u0641\u062a\u0646 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u06cc\u0634\u0648\u062f | \u0631\u0648\u0634 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u0646\u0648\u0634\u062a\u0646 \u06a9\u062f \u062a\u0645\u06cc\u0632 \u0648 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0628\u06cc\u0634\u062a\u0631","og_url":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/","og_site_name":"\u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627","article_published_time":"2021-05-03T07:01:47+00:00","article_modified_time":"2021-10-31T05:14:26+00:00","og_image":[{"width":1200,"height":360,"url":"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/Best-Practices-for-Writing-Super-Readable-Code.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a":"\u0645\u0647\u0633\u0627 \u0645\u062d\u0645\u062f\u06cc","\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646":"13 \u062f\u0642\u06cc\u0642\u0647"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Person","Organization"],"@id":"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b","name":"bagher rezvan","image":{"@type":"ImageObject","@id":"https:\/\/rabsana.ir\/tutorials\/#personlogo","inLanguage":"fa-IR","url":"https:\/\/secure.gravatar.com\/avatar\/43c698432e5f8e000d945d3945e15b50?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/43c698432e5f8e000d945d3945e15b50?s=96&d=mm&r=g","caption":"bagher rezvan"},"logo":{"@id":"https:\/\/rabsana.ir\/tutorials\/#personlogo"}},{"@type":"WebSite","@id":"https:\/\/rabsana.ir\/tutorials\/#website","url":"https:\/\/rabsana.ir\/tutorials\/","name":"\u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627","description":"\u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u062a\u062e\u0635\u0635\u06cc \u0634\u0631\u06a9\u062a \u0637\u0631\u0627\u062d\u06cc \u0633\u0627\u06cc\u062a \u0631\u0627\u0628\u0633\u0627\u0646\u0627","publisher":{"@id":"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rabsana.ir\/tutorials\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fa-IR"},{"@type":"ImageObject","@id":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#primaryimage","inLanguage":"fa-IR","url":"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/Best-Practices-for-Writing-Super-Readable-Code.jpg","contentUrl":"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/Best-Practices-for-Writing-Super-Readable-Code.jpg","width":1200,"height":360,"caption":"\u0686\u0637\u0648\u0631 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u06a9\u062f \u062d\u0631\u0641\u0647 \u0627\u06cc \u0648\u062e\u0648\u0627\u0646\u0627 \u0628\u0646\u0648\u06cc\u0633\u0645"},{"@type":"WebPage","@id":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#webpage","url":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/","name":"18 \u0631\u0648\u0634 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc | \u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627","isPartOf":{"@id":"https:\/\/rabsana.ir\/tutorials\/#website"},"primaryImageOfPage":{"@id":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#primaryimage"},"datePublished":"2021-05-03T07:01:47+00:00","dateModified":"2021-10-31T05:14:26+00:00","description":"\u0686\u06af\u0648\u0646\u0647 \u06a9\u062f \u062e\u0648\u0627\u0646\u0627 \u0628\u0646\u0648\u06cc\u0633\u06cc\u0645\u061f18 \u0631\u0648\u0634 \u06a9\u0647 \u0628\u0627\u0639\u062b \u0628\u0627\u0644\u0627 \u0631\u0641\u062a\u0646 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u06cc\u0634\u0648\u062f | \u0631\u0648\u0634 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u0646\u0648\u0634\u062a\u0646 \u06a9\u062f \u062a\u0645\u06cc\u0632 \u0648 \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u0628\u06cc\u0634\u062a\u0631","breadcrumb":{"@id":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#breadcrumb"},"inLanguage":"fa-IR","potentialAction":[{"@type":"ReadAction","target":["http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u062e\u0627\u0646\u0647","item":"https:\/\/rabsana.ir\/tutorials\/"},{"@type":"ListItem","position":2,"name":"18 \u0631\u0648\u0634 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc"}]},{"@type":"Article","@id":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#article","isPartOf":{"@id":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#webpage"},"author":{"@id":"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/f95a0ac81e3ccf2f7b115822a7a815cd"},"headline":"18 \u0631\u0648\u0634 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0627\u06cc\u06cc \u06a9\u062f\u0647\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc","datePublished":"2021-05-03T07:01:47+00:00","dateModified":"2021-10-31T05:14:26+00:00","mainEntityOfPage":{"@id":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#webpage"},"wordCount":153,"publisher":{"@id":"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b"},"image":{"@id":"http:\/\/rabsana.ir\/tutorials\/top-18-best-practices-for-writing-readable-codes\/#primaryimage"},"thumbnailUrl":"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/05\/Best-Practices-for-Writing-Super-Readable-Code.jpg","articleSection":["\u0622\u062e\u0631\u06cc\u0646 \u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc \u0647\u0627\u06cc \u06a9\u0627\u0645\u067e\u06cc\u0648\u062a\u0631"],"inLanguage":"fa-IR"},{"@type":"Person","@id":"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/f95a0ac81e3ccf2f7b115822a7a815cd","name":"\u0645\u0647\u0633\u0627 \u0645\u062d\u0645\u062f\u06cc","image":{"@type":"ImageObject","@id":"https:\/\/rabsana.ir\/tutorials\/#personlogo","inLanguage":"fa-IR","url":"https:\/\/secure.gravatar.com\/avatar\/0910931d9fb93b2b6b0627aa03c9f1c6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0910931d9fb93b2b6b0627aa03c9f1c6?s=96&d=mm&r=g","caption":"\u0645\u0647\u0633\u0627 \u0645\u062d\u0645\u062f\u06cc"},"url":"https:\/\/rabsana.ir\/tutorials\/author\/mahsa-mhmdi\/"}]}},"_links":{"self":[{"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/posts\/223"}],"collection":[{"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/comments?post=223"}],"version-history":[{"count":21,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/posts\/223\/revisions"}],"predecessor-version":[{"id":3264,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/posts\/223\/revisions\/3264"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/media\/2303"}],"wp:attachment":[{"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/media?parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/categories?post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/tags?post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}