[{"data":1,"prerenderedAt":1206},["ShallowReactive",2],{"content-all-\u002Fphp\u002Fphp-fundamental\u002Foutput-input":3,"related-\u002Fphp\u002Fphp-fundamental\u002Foutput-input":929,"sidebar-content":1157},[4],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"tags":11,"date":16,"weight":17,"body":18,"_type":923,"_id":924,"_source":925,"_file":926,"_stem":927,"_extension":928},"\u002Fphp\u002Fphp-fundamental\u002Foutput-input","php-fundamental",false,"","PHP Output & Input","Learning about PHP output and input methods",[12,13,14,15],"php","backend","output","input","2026-05-30",2,{"type":19,"children":20,"toc":909},"root",[21,30,61,67,79,127,132,150,187,192,203,277,283,318,324,359,475,481,499,600,606,651,752,758,770,892,898,903],{"type":22,"tag":23,"props":24,"children":26},"element","h2",{"id":25},"php-output-methods",[27],{"type":28,"value":29},"text","PHP Output Methods",{"type":22,"tag":31,"props":32,"children":33},"p",{},[34,36,43,45,51,53,59],{"type":28,"value":35},"In PHP, there are several ways to output data to the browser. The most common methods include ",{"type":22,"tag":37,"props":38,"children":40},"code",{"className":39},[],[41],{"type":28,"value":42},"echo",{"type":28,"value":44},", ",{"type":22,"tag":37,"props":46,"children":48},{"className":47},[],[49],{"type":28,"value":50},"print",{"type":28,"value":52},", and ",{"type":22,"tag":37,"props":54,"children":56},{"className":55},[],[57],{"type":28,"value":58},"printf",{"type":28,"value":60},". Each of these functions has its own use cases and advantages.",{"type":22,"tag":62,"props":63,"children":64},"h3",{"id":42},[65],{"type":28,"value":66},"Echo",{"type":22,"tag":31,"props":68,"children":69},{},[70,72,77],{"type":28,"value":71},"The ",{"type":22,"tag":37,"props":73,"children":75},{"className":74},[],[76],{"type":28,"value":42},{"type":28,"value":78}," statement is used to output one or more strings. It is a language construct and does not return a value.",{"type":22,"tag":80,"props":81,"children":84},"pre",{"className":82,"code":83,"language":12,"meta":8,"style":8},"language-php shiki shiki-themes github-light github-dark","echo \"Hello, World!\";\necho \"This is PHP output.\";\n",[85],{"type":22,"tag":37,"props":86,"children":87},{"__ignoreMap":8},[88,111],{"type":22,"tag":89,"props":90,"children":93},"span",{"class":91,"line":92},"line",1,[94,99,105],{"type":22,"tag":89,"props":95,"children":97},{"style":96},"--shiki-default:#005CC5;--shiki-dark:#79B8FF",[98],{"type":28,"value":42},{"type":22,"tag":89,"props":100,"children":102},{"style":101},"--shiki-default:#032F62;--shiki-dark:#9ECBFF",[103],{"type":28,"value":104}," \"Hello, World!\"",{"type":22,"tag":89,"props":106,"children":108},{"style":107},"--shiki-default:#24292E;--shiki-dark:#E1E4E8",[109],{"type":28,"value":110},";\n",{"type":22,"tag":89,"props":112,"children":113},{"class":91,"line":17},[114,118,123],{"type":22,"tag":89,"props":115,"children":116},{"style":96},[117],{"type":28,"value":42},{"type":22,"tag":89,"props":119,"children":120},{"style":101},[121],{"type":28,"value":122}," \"This is PHP output.\"",{"type":22,"tag":89,"props":124,"children":125},{"style":107},[126],{"type":28,"value":110},{"type":22,"tag":62,"props":128,"children":129},{"id":50},[130],{"type":28,"value":131},"Print",{"type":22,"tag":31,"props":133,"children":134},{},[135,136,141,143,148],{"type":28,"value":71},{"type":22,"tag":37,"props":137,"children":139},{"className":138},[],[140],{"type":28,"value":50},{"type":28,"value":142}," statement is similar to ",{"type":22,"tag":37,"props":144,"children":146},{"className":145},[],[147],{"type":28,"value":42},{"type":28,"value":149},", but it returns a value of 1, which can be useful in certain situations.",{"type":22,"tag":80,"props":151,"children":153},{"className":82,"code":152,"language":12,"meta":8,"style":8},"print \"Hello, World!\";\nprint \"This is PHP output.\";\n",[154],{"type":22,"tag":37,"props":155,"children":156},{"__ignoreMap":8},[157,172],{"type":22,"tag":89,"props":158,"children":159},{"class":91,"line":92},[160,164,168],{"type":22,"tag":89,"props":161,"children":162},{"style":96},[163],{"type":28,"value":50},{"type":22,"tag":89,"props":165,"children":166},{"style":101},[167],{"type":28,"value":104},{"type":22,"tag":89,"props":169,"children":170},{"style":107},[171],{"type":28,"value":110},{"type":22,"tag":89,"props":173,"children":174},{"class":91,"line":17},[175,179,183],{"type":22,"tag":89,"props":176,"children":177},{"style":96},[178],{"type":28,"value":50},{"type":22,"tag":89,"props":180,"children":181},{"style":101},[182],{"type":28,"value":122},{"type":22,"tag":89,"props":184,"children":185},{"style":107},[186],{"type":28,"value":110},{"type":22,"tag":62,"props":188,"children":189},{"id":58},[190],{"type":28,"value":191},"Printf",{"type":22,"tag":31,"props":193,"children":194},{},[195,196,201],{"type":28,"value":71},{"type":22,"tag":37,"props":197,"children":199},{"className":198},[],[200],{"type":28,"value":58},{"type":28,"value":202}," function allows you to format a string before outputting it. It uses placeholders for variables, which can be useful for creating more complex output.",{"type":22,"tag":80,"props":204,"children":206},{"className":82,"code":205,"language":12,"meta":8,"style":8},"$name = \"John\";\n$age = 30;\nprintf(\"My name is %s and I am %d years old.\", $name, $age);\n",[207],{"type":22,"tag":37,"props":208,"children":209},{"__ignoreMap":8},[210,233,254],{"type":22,"tag":89,"props":211,"children":212},{"class":91,"line":92},[213,218,224,229],{"type":22,"tag":89,"props":214,"children":215},{"style":107},[216],{"type":28,"value":217},"$name ",{"type":22,"tag":89,"props":219,"children":221},{"style":220},"--shiki-default:#D73A49;--shiki-dark:#F97583",[222],{"type":28,"value":223},"=",{"type":22,"tag":89,"props":225,"children":226},{"style":101},[227],{"type":28,"value":228}," \"John\"",{"type":22,"tag":89,"props":230,"children":231},{"style":107},[232],{"type":28,"value":110},{"type":22,"tag":89,"props":234,"children":235},{"class":91,"line":17},[236,241,245,250],{"type":22,"tag":89,"props":237,"children":238},{"style":107},[239],{"type":28,"value":240},"$age ",{"type":22,"tag":89,"props":242,"children":243},{"style":220},[244],{"type":28,"value":223},{"type":22,"tag":89,"props":246,"children":247},{"style":96},[248],{"type":28,"value":249}," 30",{"type":22,"tag":89,"props":251,"children":252},{"style":107},[253],{"type":28,"value":110},{"type":22,"tag":89,"props":255,"children":257},{"class":91,"line":256},3,[258,262,267,272],{"type":22,"tag":89,"props":259,"children":260},{"style":96},[261],{"type":28,"value":58},{"type":22,"tag":89,"props":263,"children":264},{"style":107},[265],{"type":28,"value":266},"(",{"type":22,"tag":89,"props":268,"children":269},{"style":101},[270],{"type":28,"value":271},"\"My name is %s and I am %d years old.\"",{"type":22,"tag":89,"props":273,"children":274},{"style":107},[275],{"type":28,"value":276},", $name, $age);\n",{"type":22,"tag":23,"props":278,"children":280},{"id":279},"php-input-methods",[281],{"type":28,"value":282},"PHP Input Methods",{"type":22,"tag":31,"props":284,"children":285},{},[286,288,294,295,301,302,308,310,316],{"type":28,"value":287},"In PHP, there are several ways to handle input from users or other sources. The most common methods include using superglobals like ",{"type":22,"tag":37,"props":289,"children":291},{"className":290},[],[292],{"type":28,"value":293},"$_GET",{"type":28,"value":44},{"type":22,"tag":37,"props":296,"children":298},{"className":297},[],[299],{"type":28,"value":300},"$_POST",{"type":28,"value":52},{"type":22,"tag":37,"props":303,"children":305},{"className":304},[],[306],{"type":28,"value":307},"$_REQUEST",{"type":28,"value":309},", as well as handling command-line arguments with ",{"type":22,"tag":37,"props":311,"children":313},{"className":312},[],[314],{"type":28,"value":315},"$argv",{"type":28,"value":317},". Each of these methods serves a specific purpose and is used in different contexts.",{"type":22,"tag":62,"props":319,"children":321},{"id":320},"get-method",[322],{"type":28,"value":323},"GET Method",{"type":22,"tag":31,"props":325,"children":326},{},[327,328,333,335,341,343,349,351,357],{"type":28,"value":71},{"type":22,"tag":37,"props":329,"children":331},{"className":330},[],[332],{"type":28,"value":293},{"type":28,"value":334}," superglobal is used to collect data sent in the URL query string. For example, if you have a URL like ",{"type":22,"tag":37,"props":336,"children":338},{"className":337},[],[339],{"type":28,"value":340},"http:\u002F\u002Fexample.com?name=John",{"type":28,"value":342},", you can access the value of ",{"type":22,"tag":37,"props":344,"children":346},{"className":345},[],[347],{"type":28,"value":348},"name",{"type":28,"value":350}," using ",{"type":22,"tag":37,"props":352,"children":354},{"className":353},[],[355],{"type":28,"value":356},"$_GET['name']",{"type":28,"value":358},".",{"type":22,"tag":80,"props":360,"children":362},{"className":82,"code":361,"language":12,"meta":8,"style":8},"if (isset($_GET['name'])) {\n    $name = $_GET['name'];\n    echo \"Hello, \" . htmlspecialchars($name) . \"!\";\n}\n",[363],{"type":22,"tag":37,"props":364,"children":365},{"__ignoreMap":8},[366,399,425,466],{"type":22,"tag":89,"props":367,"children":368},{"class":91,"line":92},[369,374,379,384,389,394],{"type":22,"tag":89,"props":370,"children":371},{"style":220},[372],{"type":28,"value":373},"if",{"type":22,"tag":89,"props":375,"children":376},{"style":107},[377],{"type":28,"value":378}," (",{"type":22,"tag":89,"props":380,"children":381},{"style":96},[382],{"type":28,"value":383},"isset",{"type":22,"tag":89,"props":385,"children":386},{"style":107},[387],{"type":28,"value":388},"($_GET[",{"type":22,"tag":89,"props":390,"children":391},{"style":101},[392],{"type":28,"value":393},"'name'",{"type":22,"tag":89,"props":395,"children":396},{"style":107},[397],{"type":28,"value":398},"])) {\n",{"type":22,"tag":89,"props":400,"children":401},{"class":91,"line":17},[402,407,411,416,420],{"type":22,"tag":89,"props":403,"children":404},{"style":107},[405],{"type":28,"value":406},"    $name ",{"type":22,"tag":89,"props":408,"children":409},{"style":220},[410],{"type":28,"value":223},{"type":22,"tag":89,"props":412,"children":413},{"style":107},[414],{"type":28,"value":415}," $_GET[",{"type":22,"tag":89,"props":417,"children":418},{"style":101},[419],{"type":28,"value":393},{"type":22,"tag":89,"props":421,"children":422},{"style":107},[423],{"type":28,"value":424},"];\n",{"type":22,"tag":89,"props":426,"children":427},{"class":91,"line":256},[428,433,438,443,448,453,457,462],{"type":22,"tag":89,"props":429,"children":430},{"style":96},[431],{"type":28,"value":432},"    echo",{"type":22,"tag":89,"props":434,"children":435},{"style":101},[436],{"type":28,"value":437}," \"Hello, \"",{"type":22,"tag":89,"props":439,"children":440},{"style":220},[441],{"type":28,"value":442}," .",{"type":22,"tag":89,"props":444,"children":445},{"style":96},[446],{"type":28,"value":447}," htmlspecialchars",{"type":22,"tag":89,"props":449,"children":450},{"style":107},[451],{"type":28,"value":452},"($name) ",{"type":22,"tag":89,"props":454,"children":455},{"style":220},[456],{"type":28,"value":358},{"type":22,"tag":89,"props":458,"children":459},{"style":101},[460],{"type":28,"value":461}," \"!\"",{"type":22,"tag":89,"props":463,"children":464},{"style":107},[465],{"type":28,"value":110},{"type":22,"tag":89,"props":467,"children":469},{"class":91,"line":468},4,[470],{"type":22,"tag":89,"props":471,"children":472},{"style":107},[473],{"type":28,"value":474},"}\n",{"type":22,"tag":62,"props":476,"children":478},{"id":477},"post-method",[479],{"type":28,"value":480},"POST Method",{"type":22,"tag":31,"props":482,"children":483},{},[484,485,490,492,498],{"type":28,"value":71},{"type":22,"tag":37,"props":486,"children":488},{"className":487},[],[489],{"type":28,"value":300},{"type":28,"value":491}," superglobal is used to collect data sent in the body of a POST request, typically from an HTML form. For example, if you have a form that submits a user's name, you can access it using ",{"type":22,"tag":37,"props":493,"children":495},{"className":494},[],[496],{"type":28,"value":497},"$_POST['name']",{"type":28,"value":358},{"type":22,"tag":80,"props":500,"children":502},{"className":82,"code":501,"language":12,"meta":8,"style":8},"if (isset($_POST['name'])) {\n    $name = $_POST['name'];\n    echo \"Hello, \" . htmlspecialchars($name) . \"!\";\n}\n",[503],{"type":22,"tag":37,"props":504,"children":505},{"__ignoreMap":8},[506,534,558,593],{"type":22,"tag":89,"props":507,"children":508},{"class":91,"line":92},[509,513,517,521,526,530],{"type":22,"tag":89,"props":510,"children":511},{"style":220},[512],{"type":28,"value":373},{"type":22,"tag":89,"props":514,"children":515},{"style":107},[516],{"type":28,"value":378},{"type":22,"tag":89,"props":518,"children":519},{"style":96},[520],{"type":28,"value":383},{"type":22,"tag":89,"props":522,"children":523},{"style":107},[524],{"type":28,"value":525},"($_POST[",{"type":22,"tag":89,"props":527,"children":528},{"style":101},[529],{"type":28,"value":393},{"type":22,"tag":89,"props":531,"children":532},{"style":107},[533],{"type":28,"value":398},{"type":22,"tag":89,"props":535,"children":536},{"class":91,"line":17},[537,541,545,550,554],{"type":22,"tag":89,"props":538,"children":539},{"style":107},[540],{"type":28,"value":406},{"type":22,"tag":89,"props":542,"children":543},{"style":220},[544],{"type":28,"value":223},{"type":22,"tag":89,"props":546,"children":547},{"style":107},[548],{"type":28,"value":549}," $_POST[",{"type":22,"tag":89,"props":551,"children":552},{"style":101},[553],{"type":28,"value":393},{"type":22,"tag":89,"props":555,"children":556},{"style":107},[557],{"type":28,"value":424},{"type":22,"tag":89,"props":559,"children":560},{"class":91,"line":256},[561,565,569,573,577,581,585,589],{"type":22,"tag":89,"props":562,"children":563},{"style":96},[564],{"type":28,"value":432},{"type":22,"tag":89,"props":566,"children":567},{"style":101},[568],{"type":28,"value":437},{"type":22,"tag":89,"props":570,"children":571},{"style":220},[572],{"type":28,"value":442},{"type":22,"tag":89,"props":574,"children":575},{"style":96},[576],{"type":28,"value":447},{"type":22,"tag":89,"props":578,"children":579},{"style":107},[580],{"type":28,"value":452},{"type":22,"tag":89,"props":582,"children":583},{"style":220},[584],{"type":28,"value":358},{"type":22,"tag":89,"props":586,"children":587},{"style":101},[588],{"type":28,"value":461},{"type":22,"tag":89,"props":590,"children":591},{"style":107},[592],{"type":28,"value":110},{"type":22,"tag":89,"props":594,"children":595},{"class":91,"line":468},[596],{"type":22,"tag":89,"props":597,"children":598},{"style":107},[599],{"type":28,"value":474},{"type":22,"tag":62,"props":601,"children":603},{"id":602},"request-method",[604],{"type":28,"value":605},"REQUEST Method",{"type":22,"tag":31,"props":607,"children":608},{},[609,610,615,617,622,623,628,629,635,637,642,644,649],{"type":28,"value":71},{"type":22,"tag":37,"props":611,"children":613},{"className":612},[],[614],{"type":28,"value":307},{"type":28,"value":616}," superglobal is a combination of ",{"type":22,"tag":37,"props":618,"children":620},{"className":619},[],[621],{"type":28,"value":293},{"type":28,"value":44},{"type":22,"tag":37,"props":624,"children":626},{"className":625},[],[627],{"type":28,"value":300},{"type":28,"value":52},{"type":22,"tag":37,"props":630,"children":632},{"className":631},[],[633],{"type":28,"value":634},"$_COOKIE",{"type":28,"value":636},". It can be used to access data from any of these sources, but it is generally recommended to use ",{"type":22,"tag":37,"props":638,"children":640},{"className":639},[],[641],{"type":28,"value":293},{"type":28,"value":643}," or ",{"type":22,"tag":37,"props":645,"children":647},{"className":646},[],[648],{"type":28,"value":300},{"type":28,"value":650}," explicitly for better security and clarity.",{"type":22,"tag":80,"props":652,"children":654},{"className":82,"code":653,"language":12,"meta":8,"style":8},"if (isset($_REQUEST['name'])) {\n    $name = $_REQUEST['name'];\n    echo \"Hello, \" . htmlspecialchars($name) . \"!\";\n}\n",[655],{"type":22,"tag":37,"props":656,"children":657},{"__ignoreMap":8},[658,686,710,745],{"type":22,"tag":89,"props":659,"children":660},{"class":91,"line":92},[661,665,669,673,678,682],{"type":22,"tag":89,"props":662,"children":663},{"style":220},[664],{"type":28,"value":373},{"type":22,"tag":89,"props":666,"children":667},{"style":107},[668],{"type":28,"value":378},{"type":22,"tag":89,"props":670,"children":671},{"style":96},[672],{"type":28,"value":383},{"type":22,"tag":89,"props":674,"children":675},{"style":107},[676],{"type":28,"value":677},"($_REQUEST[",{"type":22,"tag":89,"props":679,"children":680},{"style":101},[681],{"type":28,"value":393},{"type":22,"tag":89,"props":683,"children":684},{"style":107},[685],{"type":28,"value":398},{"type":22,"tag":89,"props":687,"children":688},{"class":91,"line":17},[689,693,697,702,706],{"type":22,"tag":89,"props":690,"children":691},{"style":107},[692],{"type":28,"value":406},{"type":22,"tag":89,"props":694,"children":695},{"style":220},[696],{"type":28,"value":223},{"type":22,"tag":89,"props":698,"children":699},{"style":107},[700],{"type":28,"value":701}," $_REQUEST[",{"type":22,"tag":89,"props":703,"children":704},{"style":101},[705],{"type":28,"value":393},{"type":22,"tag":89,"props":707,"children":708},{"style":107},[709],{"type":28,"value":424},{"type":22,"tag":89,"props":711,"children":712},{"class":91,"line":256},[713,717,721,725,729,733,737,741],{"type":22,"tag":89,"props":714,"children":715},{"style":96},[716],{"type":28,"value":432},{"type":22,"tag":89,"props":718,"children":719},{"style":101},[720],{"type":28,"value":437},{"type":22,"tag":89,"props":722,"children":723},{"style":220},[724],{"type":28,"value":442},{"type":22,"tag":89,"props":726,"children":727},{"style":96},[728],{"type":28,"value":447},{"type":22,"tag":89,"props":730,"children":731},{"style":107},[732],{"type":28,"value":452},{"type":22,"tag":89,"props":734,"children":735},{"style":220},[736],{"type":28,"value":358},{"type":22,"tag":89,"props":738,"children":739},{"style":101},[740],{"type":28,"value":461},{"type":22,"tag":89,"props":742,"children":743},{"style":107},[744],{"type":28,"value":110},{"type":22,"tag":89,"props":746,"children":747},{"class":91,"line":468},[748],{"type":22,"tag":89,"props":749,"children":750},{"style":107},[751],{"type":28,"value":474},{"type":22,"tag":62,"props":753,"children":755},{"id":754},"arguments-from-command-line",[756],{"type":28,"value":757},"Arguments from Command Line",{"type":22,"tag":31,"props":759,"children":760},{},[761,763,768],{"type":28,"value":762},"When running a PHP script from the command line, you can access arguments passed to the script using the ",{"type":22,"tag":37,"props":764,"children":766},{"className":765},[],[767],{"type":28,"value":315},{"type":28,"value":769}," array. The first element of this array is the script name, and subsequent elements are the arguments.",{"type":22,"tag":80,"props":771,"children":773},{"className":82,"code":772,"language":12,"meta":8,"style":8},"if (isset($argv[1])) {\n    $name = $argv[1];\n    echo \"Hello, \" . htmlspecialchars($name) . \"!\";\n}\n\n\u002F\u002F Example usage: php script.php John\n",[774],{"type":22,"tag":37,"props":775,"children":776},{"__ignoreMap":8},[777,806,830,865,872,882],{"type":22,"tag":89,"props":778,"children":779},{"class":91,"line":92},[780,784,788,792,797,802],{"type":22,"tag":89,"props":781,"children":782},{"style":220},[783],{"type":28,"value":373},{"type":22,"tag":89,"props":785,"children":786},{"style":107},[787],{"type":28,"value":378},{"type":22,"tag":89,"props":789,"children":790},{"style":96},[791],{"type":28,"value":383},{"type":22,"tag":89,"props":793,"children":794},{"style":107},[795],{"type":28,"value":796},"($argv[",{"type":22,"tag":89,"props":798,"children":799},{"style":96},[800],{"type":28,"value":801},"1",{"type":22,"tag":89,"props":803,"children":804},{"style":107},[805],{"type":28,"value":398},{"type":22,"tag":89,"props":807,"children":808},{"class":91,"line":17},[809,813,817,822,826],{"type":22,"tag":89,"props":810,"children":811},{"style":107},[812],{"type":28,"value":406},{"type":22,"tag":89,"props":814,"children":815},{"style":220},[816],{"type":28,"value":223},{"type":22,"tag":89,"props":818,"children":819},{"style":107},[820],{"type":28,"value":821}," $argv[",{"type":22,"tag":89,"props":823,"children":824},{"style":96},[825],{"type":28,"value":801},{"type":22,"tag":89,"props":827,"children":828},{"style":107},[829],{"type":28,"value":424},{"type":22,"tag":89,"props":831,"children":832},{"class":91,"line":256},[833,837,841,845,849,853,857,861],{"type":22,"tag":89,"props":834,"children":835},{"style":96},[836],{"type":28,"value":432},{"type":22,"tag":89,"props":838,"children":839},{"style":101},[840],{"type":28,"value":437},{"type":22,"tag":89,"props":842,"children":843},{"style":220},[844],{"type":28,"value":442},{"type":22,"tag":89,"props":846,"children":847},{"style":96},[848],{"type":28,"value":447},{"type":22,"tag":89,"props":850,"children":851},{"style":107},[852],{"type":28,"value":452},{"type":22,"tag":89,"props":854,"children":855},{"style":220},[856],{"type":28,"value":358},{"type":22,"tag":89,"props":858,"children":859},{"style":101},[860],{"type":28,"value":461},{"type":22,"tag":89,"props":862,"children":863},{"style":107},[864],{"type":28,"value":110},{"type":22,"tag":89,"props":866,"children":867},{"class":91,"line":468},[868],{"type":22,"tag":89,"props":869,"children":870},{"style":107},[871],{"type":28,"value":474},{"type":22,"tag":89,"props":873,"children":875},{"class":91,"line":874},5,[876],{"type":22,"tag":89,"props":877,"children":879},{"emptyLinePlaceholder":878},true,[880],{"type":28,"value":881},"\n",{"type":22,"tag":89,"props":883,"children":885},{"class":91,"line":884},6,[886],{"type":22,"tag":89,"props":887,"children":889},{"style":888},"--shiki-default:#6A737D;--shiki-dark:#6A737D",[890],{"type":28,"value":891},"\u002F\u002F Example usage: php script.php John\n",{"type":22,"tag":23,"props":893,"children":895},{"id":894},"conclusion",[896],{"type":28,"value":897},"Conclusion",{"type":22,"tag":31,"props":899,"children":900},{},[901],{"type":28,"value":902},"PHP provides various methods for outputting data and handling input from users. Understanding these methods is essential for creating interactive and dynamic web applications. Always consider the context in which you are working with output and input, and choose the appropriate method to ensure your code is secure and efficient.",{"type":22,"tag":904,"props":905,"children":906},"style",{},[907],{"type":28,"value":908},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":8,"searchDepth":256,"depth":256,"links":910},[911,916,922],{"id":25,"depth":17,"text":29,"children":912},[913,914,915],{"id":42,"depth":256,"text":66},{"id":50,"depth":256,"text":131},{"id":58,"depth":256,"text":191},{"id":279,"depth":17,"text":282,"children":917},[918,919,920,921],{"id":320,"depth":256,"text":323},{"id":477,"depth":256,"text":480},{"id":602,"depth":256,"text":605},{"id":754,"depth":256,"text":757},{"id":894,"depth":17,"text":897},"markdown","content:php:php-fundamental:output-input.md","content","php\u002Fphp-fundamental\u002Foutput-input.md","php\u002Fphp-fundamental\u002Foutput-input","md",[930,938,946,951,957,966,971,976,981,986,991,1000,1006,1011,1016,1021,1026,1031,1037,1045,1053,1058,1065,1070,1077,1083,1089,1097,1103,1109,1116,1122,1128,1140,1146,1151],{"_path":931,"title":932,"description":933,"tags":934,"date":937},"\u002Fcpp","C++ \u002F CPP","C++ notes, snippets, and references",[935,936],"cpp","c++","2026-05-05",{"_path":939,"title":940,"description":941,"tags":942,"date":945},"\u002Fdata-structure-algorithm\u002Farray-manipulation\u002Ffor-looping","For Looping in Python","Using for loops to manipulate arrays in Python.",[943,13,944],"python","arrays","2026-03-18",{"_path":947,"title":948,"description":949,"tags":950,"date":945},"\u002Fdata-structure-algorithm\u002Farray-manipulation\u002Fwhile-looping","While Looping in Python","Using while loops to manipulate arrays in Python.",[943,13,944],{"_path":952,"title":953,"description":954,"tags":955,"date":956},"\u002Fdata-structure-algorithm\u002Fassignments","Assignments","Assignments in Python for competitive programming.",[943,13],"2026-04-10",{"_path":958,"title":959,"description":960,"tags":961,"date":965},"\u002Fdata-structure-algorithm\u002Fbuzzword","Buzzword List DSA","Common terms and concepts in data structures and algorithms.",[962,963,964],"dsa","algorithms","data-structures","2026-04-03",{"_path":967,"title":968,"description":969,"tags":970,"date":956},"\u002Fdata-structure-algorithm\u002Fdata-type","Data Types","Data types in Python for competitive programming.",[943,13],{"_path":972,"title":973,"description":974,"tags":975,"date":956},"\u002Fdata-structure-algorithm\u002Fhash-map","Hash Map","Hash map implementation in Python for competitive programming.",[943,13],{"_path":977,"title":978,"description":979,"tags":980,"date":956},"\u002Fdata-structure-algorithm\u002Finput-output","Input and Output","Handling input and output in Python for competitive programming.",[943,13],{"_path":982,"title":983,"description":984,"tags":985,"date":945},"\u002Fdata-structure-algorithm\u002Fmath-library\u002Fsum","Sum Elements","Using for loops to sum elements in Python.",[943,13,944],{"_path":987,"title":988,"description":989,"tags":990,"date":945},"\u002Fdata-structure-algorithm\u002Fmath-library\u002Fsummary","Summary","Summary of the math library in Python.",[943,13,944],{"_path":992,"title":993,"description":994,"tags":995,"date":999},"\u002Fdocker\u002Fcheat-sheets","Docker Cheat Sheets","Cheat sheets for frequently used Docker commands and concepts",[996,997,998],"docker","devops","infrastructure","2026-05-01",{"_path":1001,"title":1002,"description":1003,"tags":1004,"date":1005},"\u002Fdocker\u002Fdocker-dasar\u002Fdocker-container","Docker Container","Introduction to Docker containers and their usage",[996,997,998],"2026-03-12",{"_path":1007,"title":1008,"description":1009,"tags":1010,"date":1005},"\u002Fdocker\u002Fdocker-dasar\u002Fdocker-execution","Docker Execution","Introduction to Docker execution and their usage",[996,997,998],{"_path":1012,"title":1013,"description":1014,"tags":1015,"date":1005},"\u002Fdocker\u002Fdocker-dasar\u002Fdocker-image","Docker Image","Introduction to Docker images and their usage",[996,997,998],{"_path":1017,"title":1018,"description":1019,"tags":1020,"date":1005},"\u002Fdocker\u002Fdocker-dasar\u002Fdocker-logging","Docker Logging","Introduction to Docker logging and their usage",[996,997,998],{"_path":1022,"title":1023,"description":1024,"tags":1025,"date":1005},"\u002Fdocker\u002Fdocker-prerequisites\u002Fdocker-installation","Docker Installation","Introduction to Docker installation and their usage",[996,997,998],{"_path":1027,"title":1028,"description":1029,"tags":1030,"date":1005},"\u002Fdocker\u002Fresources","Docker Resources","Collection of Docker resources for learning and reference",[996,997,998],{"_path":1032,"title":1033,"description":1034,"tags":1035,"date":937},"\u002Fjava","Java","Java notes, snippets, and references",[1036],"java",{"_path":1038,"title":1039,"description":1040,"tags":1041,"date":1005},"\u002Fjavascript\u002Fpromises","Promise Patterns","Common JavaScript promise patterns and async\u002Fawait usage",[1042,1043,1044],"javascript","frontend","async",{"_path":1046,"title":1047,"description":1048,"tags":1049,"date":937},"\u002Fjenkins","Jenkins","Jenkins notes, snippets, and references",[1050,1051,1052],"jenkins","ci","cd",{"_path":1054,"title":1055,"description":1056,"tags":1057,"date":945},"\u002Fphp\u002Farrays","PHP Array Functions","Essential PHP array functions and patterns",[12,13,944],{"_path":1059,"title":1060,"description":1061,"tags":1062,"date":1064},"\u002Fphp\u002Fpatterns\u002Fsingleton","Singleton Pattern","Implementing the singleton pattern in PHP",[12,1063,13],"patterns","2026-03-13",{"_path":1066,"title":1067,"description":1068,"tags":1069,"date":16},"\u002Fphp\u002Fphp-fundamental\u002Farray-map","PHP Array and Map","Essential PHP array and map functions and their usage",[12,13,944],{"_path":1071,"title":1072,"description":1073,"tags":1074,"date":16},"\u002Fphp\u002Fphp-fundamental\u002Fcasting-convertions","PHP Casting and Conversions","Learning about PHP casting and conversions",[12,13,1075,1076],"casting","conversions",{"_path":1078,"title":1079,"description":1080,"tags":1081,"date":16},"\u002Fphp\u002Fphp-fundamental\u002Fcomments","PHP Comments","Essential PHP comment operations",[12,13,1082],"comments",{"_path":1084,"title":1085,"description":1086,"tags":1087,"date":16},"\u002Fphp\u002Fphp-fundamental\u002Fdatatypes","PHP Data Types","Essential PHP data types and their usage",[12,13,1088],"data types",{"_path":1090,"title":1091,"description":1092,"tags":1093,"date":16},"\u002Fphp\u002Fphp-fundamental\u002Fexpression-statement-block","PHP Expressions, Statements, and Blocks","Essential PHP expressions, statements, and blocks",[12,13,1094,1095,1096],"expressions","statements","blocks",{"_path":1098,"title":1099,"description":1100,"tags":1101,"date":16},"\u002Fphp\u002Fphp-fundamental\u002Fflow-control","PHP Flow Control","Essential PHP flow control structures and patterns",[12,13,1102],"flow control",{"_path":1104,"title":1105,"description":1106,"tags":1107,"date":16},"\u002Fphp\u002Fphp-fundamental\u002Ffunctions","PHP Functions","Essential PHP functions and their usage",[12,13,1108],"functions",{"_path":1110,"title":1111,"description":1112,"tags":1113,"date":16},"\u002Fphp\u002Fphp-fundamental\u002Finclude-require","PHP Include and Require","Understanding PHP include and require statements",[12,13,1114,1115],"include","require",{"_path":1117,"title":1118,"description":1119,"tags":1120,"date":16},"\u002Fphp\u002Fphp-fundamental\u002Fintroduction","PHP Introduction","An introduction to PHP programming language and its fundamentals",[12,13,1121],"introduction",{"_path":1123,"title":1124,"description":1125,"tags":1126,"date":16},"\u002Fphp\u002Fphp-fundamental\u002Foperator","PHP Operators","Essential PHP operators and their usage",[12,13,1127],"operators",{"_path":1129,"title":1130,"description":1131,"tags":1132,"date":16},"\u002Fphp\u002Fphp-fundamental\u002Fvariables","PHP Variables","Essential PHP variables, constants, magic constants, and variable scope",[12,13,1133,1134,1135,1136,1137,1138,1139],"variables","constants","magic constants","scope","global","local","static",{"_path":1141,"title":1142,"description":1143,"tags":1144,"date":1145},"\u002Fphp\u002Freferences","PHP References (&)","Useful PHP reference snippets and patterns",[12,13],"2026-03-19",{"_path":1147,"title":1148,"description":1149,"tags":1150,"date":937},"\u002Fpython","Python","Python notes, snippets, and references",[943],{"_path":1152,"title":1153,"description":1154,"tags":1155,"date":937},"\u002Frust","Rust","Rust notes, snippets, and references",[1156],"rust",[1158,1159,1161,1162,1163,1164,1165,1166,1167,1169,1170,1172,1173,1175,1177,1179,1180,1181,1182,1183,1184,1185,1186,1188,1189,1190,1191,1193,1194,1196,1198,1199,1201,1202,1203,1204,1205],{"_path":931,"title":932,"weight":92},{"_path":939,"title":940,"weight":1160},10,{"_path":947,"title":948,"weight":1160},{"_path":952,"title":953,"weight":256},{"_path":958,"title":959,"weight":92},{"_path":967,"title":968,"weight":17},{"_path":972,"title":973,"weight":1160},{"_path":977,"title":978,"weight":92},{"_path":982,"title":983,"weight":1168},20,{"_path":987,"title":988,"weight":1160},{"_path":992,"title":993,"weight":1171},100,{"_path":1001,"title":1002,"weight":1168},{"_path":1007,"title":1008,"weight":1174},22,{"_path":1012,"title":1013,"weight":1176},21,{"_path":1017,"title":1018,"weight":1178},23,{"_path":1022,"title":1023,"weight":1160},{"_path":1027,"title":1028,"weight":92},{"_path":1032,"title":1033,"weight":92},{"_path":1038,"title":1039},{"_path":1046,"title":1047,"weight":92},{"_path":1054,"title":1055,"weight":92},{"_path":1059,"title":1060},{"_path":1066,"title":1067,"weight":1187},9,{"_path":1071,"title":1072,"weight":884},{"_path":1078,"title":1079,"weight":256},{"_path":1084,"title":1085,"weight":874},{"_path":1090,"title":1091,"weight":1192},8,{"_path":1098,"title":1099,"weight":1160},{"_path":1104,"title":1105,"weight":1195},11,{"_path":1110,"title":1111,"weight":1197},12,{"_path":1117,"title":1118,"weight":92},{"_path":1123,"title":1124,"weight":1200},7,{"_path":5,"title":9,"weight":17},{"_path":1129,"title":1130,"weight":468},{"_path":1141,"title":1142,"weight":17},{"_path":1147,"title":1148,"weight":92},{"_path":1152,"title":1153,"weight":92},1780160028189]