[{"data":1,"prerenderedAt":11620},["ShallowReactive",2],{"content-all-\u002Fphp\u002Fphp-fundamental":3,"sidebar-content":11439,"all-tags":11527},[4,1240,1619,1939,3681,4221,5567,6919,7110,7256,9266,10129],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"tags":11,"date":15,"weight":16,"body":17,"_type":1234,"_id":1235,"_source":1236,"_file":1237,"_stem":1238,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Farray-map","php-fundamental",false,"","PHP Array and Map","Essential PHP array and map functions and their usage",[12,13,14],"php","backend","arrays","2026-05-30",9,{"type":18,"children":19,"toc":1226},"root",[20,29,52,323,329,342,458,464,476,608,614,626,858,864,877,1031,1037,1042,1220],{"type":21,"tag":22,"props":23,"children":25},"element","h2",{"id":24},"array",[26],{"type":27,"value":28},"text","Array",{"type":21,"tag":30,"props":31,"children":32},"p",{},[33,35,42,44,50],{"type":27,"value":34},"In PHP, an array is a data structure that can hold multiple values. It can be indexed (numerical keys) or associative (string keys). Arrays are created using the ",{"type":21,"tag":36,"props":37,"children":39},"code",{"className":38},[],[40],{"type":27,"value":41},"array()",{"type":27,"value":43}," function or the shorthand ",{"type":21,"tag":36,"props":45,"children":47},{"className":46},[],[48],{"type":27,"value":49},"[]",{"type":27,"value":51}," syntax.",{"type":21,"tag":53,"props":54,"children":57},"pre",{"className":55,"code":56,"language":12,"meta":8,"style":8},"language-php shiki shiki-themes github-light github-dark","\u002F\u002F Indexed array\n$fruits = array(\"Apple\", \"Banana\", \"Cherry\");\n\n\u002F\u002F Associative array\n$person = array(\n    \"name\" => \"John\",\n    \"age\" => 30,\n    \"city\" => \"New York\"\n);\n\n\u002F\u002F Shorthand syntax\n$numbers = [1, 2, 3, 4, 5];\n",[58],{"type":21,"tag":36,"props":59,"children":60},{"__ignoreMap":8},[61,73,130,140,149,171,195,217,235,242,250,259],{"type":21,"tag":62,"props":63,"children":66},"span",{"class":64,"line":65},"line",1,[67],{"type":21,"tag":62,"props":68,"children":70},{"style":69},"--shiki-default:#6A737D;--shiki-dark:#6A737D",[71],{"type":27,"value":72},"\u002F\u002F Indexed array\n",{"type":21,"tag":62,"props":74,"children":76},{"class":64,"line":75},2,[77,83,89,95,100,106,111,116,120,125],{"type":21,"tag":62,"props":78,"children":80},{"style":79},"--shiki-default:#24292E;--shiki-dark:#E1E4E8",[81],{"type":27,"value":82},"$fruits ",{"type":21,"tag":62,"props":84,"children":86},{"style":85},"--shiki-default:#D73A49;--shiki-dark:#F97583",[87],{"type":27,"value":88},"=",{"type":21,"tag":62,"props":90,"children":92},{"style":91},"--shiki-default:#005CC5;--shiki-dark:#79B8FF",[93],{"type":27,"value":94}," array",{"type":21,"tag":62,"props":96,"children":97},{"style":79},[98],{"type":27,"value":99},"(",{"type":21,"tag":62,"props":101,"children":103},{"style":102},"--shiki-default:#032F62;--shiki-dark:#9ECBFF",[104],{"type":27,"value":105},"\"Apple\"",{"type":21,"tag":62,"props":107,"children":108},{"style":79},[109],{"type":27,"value":110},", ",{"type":21,"tag":62,"props":112,"children":113},{"style":102},[114],{"type":27,"value":115},"\"Banana\"",{"type":21,"tag":62,"props":117,"children":118},{"style":79},[119],{"type":27,"value":110},{"type":21,"tag":62,"props":121,"children":122},{"style":102},[123],{"type":27,"value":124},"\"Cherry\"",{"type":21,"tag":62,"props":126,"children":127},{"style":79},[128],{"type":27,"value":129},");\n",{"type":21,"tag":62,"props":131,"children":133},{"class":64,"line":132},3,[134],{"type":21,"tag":62,"props":135,"children":137},{"emptyLinePlaceholder":136},true,[138],{"type":27,"value":139},"\n",{"type":21,"tag":62,"props":141,"children":143},{"class":64,"line":142},4,[144],{"type":21,"tag":62,"props":145,"children":146},{"style":69},[147],{"type":27,"value":148},"\u002F\u002F Associative array\n",{"type":21,"tag":62,"props":150,"children":152},{"class":64,"line":151},5,[153,158,162,166],{"type":21,"tag":62,"props":154,"children":155},{"style":79},[156],{"type":27,"value":157},"$person ",{"type":21,"tag":62,"props":159,"children":160},{"style":85},[161],{"type":27,"value":88},{"type":21,"tag":62,"props":163,"children":164},{"style":91},[165],{"type":27,"value":94},{"type":21,"tag":62,"props":167,"children":168},{"style":79},[169],{"type":27,"value":170},"(\n",{"type":21,"tag":62,"props":172,"children":174},{"class":64,"line":173},6,[175,180,185,190],{"type":21,"tag":62,"props":176,"children":177},{"style":102},[178],{"type":27,"value":179},"    \"name\"",{"type":21,"tag":62,"props":181,"children":182},{"style":85},[183],{"type":27,"value":184}," =>",{"type":21,"tag":62,"props":186,"children":187},{"style":102},[188],{"type":27,"value":189}," \"John\"",{"type":21,"tag":62,"props":191,"children":192},{"style":79},[193],{"type":27,"value":194},",\n",{"type":21,"tag":62,"props":196,"children":198},{"class":64,"line":197},7,[199,204,208,213],{"type":21,"tag":62,"props":200,"children":201},{"style":102},[202],{"type":27,"value":203},"    \"age\"",{"type":21,"tag":62,"props":205,"children":206},{"style":85},[207],{"type":27,"value":184},{"type":21,"tag":62,"props":209,"children":210},{"style":91},[211],{"type":27,"value":212}," 30",{"type":21,"tag":62,"props":214,"children":215},{"style":79},[216],{"type":27,"value":194},{"type":21,"tag":62,"props":218,"children":220},{"class":64,"line":219},8,[221,226,230],{"type":21,"tag":62,"props":222,"children":223},{"style":102},[224],{"type":27,"value":225},"    \"city\"",{"type":21,"tag":62,"props":227,"children":228},{"style":85},[229],{"type":27,"value":184},{"type":21,"tag":62,"props":231,"children":232},{"style":102},[233],{"type":27,"value":234}," \"New York\"\n",{"type":21,"tag":62,"props":236,"children":237},{"class":64,"line":16},[238],{"type":21,"tag":62,"props":239,"children":240},{"style":79},[241],{"type":27,"value":129},{"type":21,"tag":62,"props":243,"children":245},{"class":64,"line":244},10,[246],{"type":21,"tag":62,"props":247,"children":248},{"emptyLinePlaceholder":136},[249],{"type":27,"value":139},{"type":21,"tag":62,"props":251,"children":253},{"class":64,"line":252},11,[254],{"type":21,"tag":62,"props":255,"children":256},{"style":69},[257],{"type":27,"value":258},"\u002F\u002F Shorthand syntax\n",{"type":21,"tag":62,"props":260,"children":262},{"class":64,"line":261},12,[263,268,272,277,282,286,291,295,300,304,309,313,318],{"type":21,"tag":62,"props":264,"children":265},{"style":79},[266],{"type":27,"value":267},"$numbers ",{"type":21,"tag":62,"props":269,"children":270},{"style":85},[271],{"type":27,"value":88},{"type":21,"tag":62,"props":273,"children":274},{"style":79},[275],{"type":27,"value":276}," [",{"type":21,"tag":62,"props":278,"children":279},{"style":91},[280],{"type":27,"value":281},"1",{"type":21,"tag":62,"props":283,"children":284},{"style":79},[285],{"type":27,"value":110},{"type":21,"tag":62,"props":287,"children":288},{"style":91},[289],{"type":27,"value":290},"2",{"type":21,"tag":62,"props":292,"children":293},{"style":79},[294],{"type":27,"value":110},{"type":21,"tag":62,"props":296,"children":297},{"style":91},[298],{"type":27,"value":299},"3",{"type":21,"tag":62,"props":301,"children":302},{"style":79},[303],{"type":27,"value":110},{"type":21,"tag":62,"props":305,"children":306},{"style":91},[307],{"type":27,"value":308},"4",{"type":21,"tag":62,"props":310,"children":311},{"style":79},[312],{"type":27,"value":110},{"type":21,"tag":62,"props":314,"children":315},{"style":91},[316],{"type":27,"value":317},"5",{"type":21,"tag":62,"props":319,"children":320},{"style":79},[321],{"type":27,"value":322},"];\n",{"type":21,"tag":22,"props":324,"children":326},{"id":325},"array-map",[327],{"type":27,"value":328},"Array Map",{"type":21,"tag":30,"props":330,"children":331},{},[332,334,340],{"type":27,"value":333},"The ",{"type":21,"tag":36,"props":335,"children":337},{"className":336},[],[338],{"type":27,"value":339},"array_map()",{"type":27,"value":341}," function applies a callback function to each element of an array and returns a new array with the modified values.",{"type":21,"tag":53,"props":343,"children":345},{"className":55,"code":344,"language":12,"meta":8,"style":8},"$numbers = [1, 2, 3, 4, 5];\n$squared = array_map(fn($n) => $n ** 2, $numbers);\n\u002F\u002F $squared is now [1, 4, 9, 16, 25]\n",[346],{"type":21,"tag":36,"props":347,"children":348},{"__ignoreMap":8},[349,404,450],{"type":21,"tag":62,"props":350,"children":351},{"class":64,"line":65},[352,356,360,364,368,372,376,380,384,388,392,396,400],{"type":21,"tag":62,"props":353,"children":354},{"style":79},[355],{"type":27,"value":267},{"type":21,"tag":62,"props":357,"children":358},{"style":85},[359],{"type":27,"value":88},{"type":21,"tag":62,"props":361,"children":362},{"style":79},[363],{"type":27,"value":276},{"type":21,"tag":62,"props":365,"children":366},{"style":91},[367],{"type":27,"value":281},{"type":21,"tag":62,"props":369,"children":370},{"style":79},[371],{"type":27,"value":110},{"type":21,"tag":62,"props":373,"children":374},{"style":91},[375],{"type":27,"value":290},{"type":21,"tag":62,"props":377,"children":378},{"style":79},[379],{"type":27,"value":110},{"type":21,"tag":62,"props":381,"children":382},{"style":91},[383],{"type":27,"value":299},{"type":21,"tag":62,"props":385,"children":386},{"style":79},[387],{"type":27,"value":110},{"type":21,"tag":62,"props":389,"children":390},{"style":91},[391],{"type":27,"value":308},{"type":21,"tag":62,"props":393,"children":394},{"style":79},[395],{"type":27,"value":110},{"type":21,"tag":62,"props":397,"children":398},{"style":91},[399],{"type":27,"value":317},{"type":21,"tag":62,"props":401,"children":402},{"style":79},[403],{"type":27,"value":322},{"type":21,"tag":62,"props":405,"children":406},{"class":64,"line":75},[407,412,416,421,425,430,435,440,445],{"type":21,"tag":62,"props":408,"children":409},{"style":79},[410],{"type":27,"value":411},"$squared ",{"type":21,"tag":62,"props":413,"children":414},{"style":85},[415],{"type":27,"value":88},{"type":21,"tag":62,"props":417,"children":418},{"style":91},[419],{"type":27,"value":420}," array_map",{"type":21,"tag":62,"props":422,"children":423},{"style":79},[424],{"type":27,"value":99},{"type":21,"tag":62,"props":426,"children":427},{"style":85},[428],{"type":27,"value":429},"fn",{"type":21,"tag":62,"props":431,"children":432},{"style":79},[433],{"type":27,"value":434},"($n) => $n ",{"type":21,"tag":62,"props":436,"children":437},{"style":85},[438],{"type":27,"value":439},"**",{"type":21,"tag":62,"props":441,"children":442},{"style":91},[443],{"type":27,"value":444}," 2",{"type":21,"tag":62,"props":446,"children":447},{"style":79},[448],{"type":27,"value":449},", $numbers);\n",{"type":21,"tag":62,"props":451,"children":452},{"class":64,"line":132},[453],{"type":21,"tag":62,"props":454,"children":455},{"style":69},[456],{"type":27,"value":457},"\u002F\u002F $squared is now [1, 4, 9, 16, 25]\n",{"type":21,"tag":22,"props":459,"children":461},{"id":460},"array-filter",[462],{"type":27,"value":463},"Array Filter",{"type":21,"tag":30,"props":465,"children":466},{},[467,468,474],{"type":27,"value":333},{"type":21,"tag":36,"props":469,"children":471},{"className":470},[],[472],{"type":27,"value":473},"array_filter()",{"type":27,"value":475}," function filters elements of an array using a callback function and returns a new array with the elements that pass the test.",{"type":21,"tag":53,"props":477,"children":479},{"className":55,"code":478,"language":12,"meta":8,"style":8},"$numbers = [1, 2, 3, 4, 5, 6];\n$even = array_filter($numbers, fn($n) => $n % 2 === 0);\n\u002F\u002F $even is now [2, 4, 6]\n",[480],{"type":21,"tag":36,"props":481,"children":482},{"__ignoreMap":8},[483,547,600],{"type":21,"tag":62,"props":484,"children":485},{"class":64,"line":65},[486,490,494,498,502,506,510,514,518,522,526,530,534,538,543],{"type":21,"tag":62,"props":487,"children":488},{"style":79},[489],{"type":27,"value":267},{"type":21,"tag":62,"props":491,"children":492},{"style":85},[493],{"type":27,"value":88},{"type":21,"tag":62,"props":495,"children":496},{"style":79},[497],{"type":27,"value":276},{"type":21,"tag":62,"props":499,"children":500},{"style":91},[501],{"type":27,"value":281},{"type":21,"tag":62,"props":503,"children":504},{"style":79},[505],{"type":27,"value":110},{"type":21,"tag":62,"props":507,"children":508},{"style":91},[509],{"type":27,"value":290},{"type":21,"tag":62,"props":511,"children":512},{"style":79},[513],{"type":27,"value":110},{"type":21,"tag":62,"props":515,"children":516},{"style":91},[517],{"type":27,"value":299},{"type":21,"tag":62,"props":519,"children":520},{"style":79},[521],{"type":27,"value":110},{"type":21,"tag":62,"props":523,"children":524},{"style":91},[525],{"type":27,"value":308},{"type":21,"tag":62,"props":527,"children":528},{"style":79},[529],{"type":27,"value":110},{"type":21,"tag":62,"props":531,"children":532},{"style":91},[533],{"type":27,"value":317},{"type":21,"tag":62,"props":535,"children":536},{"style":79},[537],{"type":27,"value":110},{"type":21,"tag":62,"props":539,"children":540},{"style":91},[541],{"type":27,"value":542},"6",{"type":21,"tag":62,"props":544,"children":545},{"style":79},[546],{"type":27,"value":322},{"type":21,"tag":62,"props":548,"children":549},{"class":64,"line":75},[550,555,559,564,569,573,577,582,586,591,596],{"type":21,"tag":62,"props":551,"children":552},{"style":79},[553],{"type":27,"value":554},"$even ",{"type":21,"tag":62,"props":556,"children":557},{"style":85},[558],{"type":27,"value":88},{"type":21,"tag":62,"props":560,"children":561},{"style":91},[562],{"type":27,"value":563}," array_filter",{"type":21,"tag":62,"props":565,"children":566},{"style":79},[567],{"type":27,"value":568},"($numbers, ",{"type":21,"tag":62,"props":570,"children":571},{"style":85},[572],{"type":27,"value":429},{"type":21,"tag":62,"props":574,"children":575},{"style":79},[576],{"type":27,"value":434},{"type":21,"tag":62,"props":578,"children":579},{"style":85},[580],{"type":27,"value":581},"%",{"type":21,"tag":62,"props":583,"children":584},{"style":91},[585],{"type":27,"value":444},{"type":21,"tag":62,"props":587,"children":588},{"style":85},[589],{"type":27,"value":590}," ===",{"type":21,"tag":62,"props":592,"children":593},{"style":91},[594],{"type":27,"value":595}," 0",{"type":21,"tag":62,"props":597,"children":598},{"style":79},[599],{"type":27,"value":129},{"type":21,"tag":62,"props":601,"children":602},{"class":64,"line":132},[603],{"type":21,"tag":62,"props":604,"children":605},{"style":69},[606],{"type":27,"value":607},"\u002F\u002F $even is now [2, 4, 6]\n",{"type":21,"tag":22,"props":609,"children":611},{"id":610},"array-reduce",[612],{"type":27,"value":613},"Array Reduce",{"type":21,"tag":30,"props":615,"children":616},{},[617,618,624],{"type":27,"value":333},{"type":21,"tag":36,"props":619,"children":621},{"className":620},[],[622],{"type":27,"value":623},"array_reduce()",{"type":27,"value":625}," function reduces an array to a single value using a callback function.",{"type":21,"tag":53,"props":627,"children":629},{"className":55,"code":628,"language":12,"meta":8,"style":8},"$items = [\n    ['name' => 'Apple', 'price' => 1.50],\n    ['name' => 'Banana', 'price' => 0.75],\n    ['name' => 'Cherry', 'price' => 2.00],\n];\n\n$total = array_reduce($items, fn($carry, $item) => $carry + $item['price'], 0);\n\u002F\u002F $total is now 4.25\n",[630],{"type":21,"tag":36,"props":631,"children":632},{"__ignoreMap":8},[633,650,695,736,777,784,791,850],{"type":21,"tag":62,"props":634,"children":635},{"class":64,"line":65},[636,641,645],{"type":21,"tag":62,"props":637,"children":638},{"style":79},[639],{"type":27,"value":640},"$items ",{"type":21,"tag":62,"props":642,"children":643},{"style":85},[644],{"type":27,"value":88},{"type":21,"tag":62,"props":646,"children":647},{"style":79},[648],{"type":27,"value":649}," [\n",{"type":21,"tag":62,"props":651,"children":652},{"class":64,"line":75},[653,658,663,667,672,676,681,685,690],{"type":21,"tag":62,"props":654,"children":655},{"style":79},[656],{"type":27,"value":657},"    [",{"type":21,"tag":62,"props":659,"children":660},{"style":102},[661],{"type":27,"value":662},"'name'",{"type":21,"tag":62,"props":664,"children":665},{"style":85},[666],{"type":27,"value":184},{"type":21,"tag":62,"props":668,"children":669},{"style":102},[670],{"type":27,"value":671}," 'Apple'",{"type":21,"tag":62,"props":673,"children":674},{"style":79},[675],{"type":27,"value":110},{"type":21,"tag":62,"props":677,"children":678},{"style":102},[679],{"type":27,"value":680},"'price'",{"type":21,"tag":62,"props":682,"children":683},{"style":85},[684],{"type":27,"value":184},{"type":21,"tag":62,"props":686,"children":687},{"style":91},[688],{"type":27,"value":689}," 1.50",{"type":21,"tag":62,"props":691,"children":692},{"style":79},[693],{"type":27,"value":694},"],\n",{"type":21,"tag":62,"props":696,"children":697},{"class":64,"line":132},[698,702,706,710,715,719,723,727,732],{"type":21,"tag":62,"props":699,"children":700},{"style":79},[701],{"type":27,"value":657},{"type":21,"tag":62,"props":703,"children":704},{"style":102},[705],{"type":27,"value":662},{"type":21,"tag":62,"props":707,"children":708},{"style":85},[709],{"type":27,"value":184},{"type":21,"tag":62,"props":711,"children":712},{"style":102},[713],{"type":27,"value":714}," 'Banana'",{"type":21,"tag":62,"props":716,"children":717},{"style":79},[718],{"type":27,"value":110},{"type":21,"tag":62,"props":720,"children":721},{"style":102},[722],{"type":27,"value":680},{"type":21,"tag":62,"props":724,"children":725},{"style":85},[726],{"type":27,"value":184},{"type":21,"tag":62,"props":728,"children":729},{"style":91},[730],{"type":27,"value":731}," 0.75",{"type":21,"tag":62,"props":733,"children":734},{"style":79},[735],{"type":27,"value":694},{"type":21,"tag":62,"props":737,"children":738},{"class":64,"line":142},[739,743,747,751,756,760,764,768,773],{"type":21,"tag":62,"props":740,"children":741},{"style":79},[742],{"type":27,"value":657},{"type":21,"tag":62,"props":744,"children":745},{"style":102},[746],{"type":27,"value":662},{"type":21,"tag":62,"props":748,"children":749},{"style":85},[750],{"type":27,"value":184},{"type":21,"tag":62,"props":752,"children":753},{"style":102},[754],{"type":27,"value":755}," 'Cherry'",{"type":21,"tag":62,"props":757,"children":758},{"style":79},[759],{"type":27,"value":110},{"type":21,"tag":62,"props":761,"children":762},{"style":102},[763],{"type":27,"value":680},{"type":21,"tag":62,"props":765,"children":766},{"style":85},[767],{"type":27,"value":184},{"type":21,"tag":62,"props":769,"children":770},{"style":91},[771],{"type":27,"value":772}," 2.00",{"type":21,"tag":62,"props":774,"children":775},{"style":79},[776],{"type":27,"value":694},{"type":21,"tag":62,"props":778,"children":779},{"class":64,"line":151},[780],{"type":21,"tag":62,"props":781,"children":782},{"style":79},[783],{"type":27,"value":322},{"type":21,"tag":62,"props":785,"children":786},{"class":64,"line":173},[787],{"type":21,"tag":62,"props":788,"children":789},{"emptyLinePlaceholder":136},[790],{"type":27,"value":139},{"type":21,"tag":62,"props":792,"children":793},{"class":64,"line":197},[794,799,803,808,813,817,822,827,832,836,841,846],{"type":21,"tag":62,"props":795,"children":796},{"style":79},[797],{"type":27,"value":798},"$total ",{"type":21,"tag":62,"props":800,"children":801},{"style":85},[802],{"type":27,"value":88},{"type":21,"tag":62,"props":804,"children":805},{"style":91},[806],{"type":27,"value":807}," array_reduce",{"type":21,"tag":62,"props":809,"children":810},{"style":79},[811],{"type":27,"value":812},"($items, ",{"type":21,"tag":62,"props":814,"children":815},{"style":85},[816],{"type":27,"value":429},{"type":21,"tag":62,"props":818,"children":819},{"style":79},[820],{"type":27,"value":821},"($carry, $item) => $carry ",{"type":21,"tag":62,"props":823,"children":824},{"style":85},[825],{"type":27,"value":826},"+",{"type":21,"tag":62,"props":828,"children":829},{"style":79},[830],{"type":27,"value":831}," $item[",{"type":21,"tag":62,"props":833,"children":834},{"style":102},[835],{"type":27,"value":680},{"type":21,"tag":62,"props":837,"children":838},{"style":79},[839],{"type":27,"value":840},"], ",{"type":21,"tag":62,"props":842,"children":843},{"style":91},[844],{"type":27,"value":845},"0",{"type":21,"tag":62,"props":847,"children":848},{"style":79},[849],{"type":27,"value":129},{"type":21,"tag":62,"props":851,"children":852},{"class":64,"line":219},[853],{"type":21,"tag":62,"props":854,"children":855},{"style":69},[856],{"type":27,"value":857},"\u002F\u002F $total is now 4.25\n",{"type":21,"tag":22,"props":859,"children":861},{"id":860},"spread-operator",[862],{"type":27,"value":863},"Spread Operator",{"type":21,"tag":30,"props":865,"children":866},{},[867,869,875],{"type":27,"value":868},"The spread operator (",{"type":21,"tag":36,"props":870,"children":872},{"className":871},[],[873],{"type":27,"value":874},"...",{"type":27,"value":876},") allows you to unpack arrays into function arguments.",{"type":21,"tag":53,"props":878,"children":880},{"className":55,"code":879,"language":12,"meta":8,"style":8},"function sum(int ...$numbers): int\n{\n    return array_sum($numbers);\n}\n$nums = [1, 2, 3];\necho sum(...$nums);  \u002F\u002F Outputs: 6\n",[881],{"type":21,"tag":36,"props":882,"children":883},{"__ignoreMap":8},[884,927,935,953,961,1001],{"type":21,"tag":62,"props":885,"children":886},{"class":64,"line":65},[887,892,898,902,907,912,917,922],{"type":21,"tag":62,"props":888,"children":889},{"style":85},[890],{"type":27,"value":891},"function",{"type":21,"tag":62,"props":893,"children":895},{"style":894},"--shiki-default:#6F42C1;--shiki-dark:#B392F0",[896],{"type":27,"value":897}," sum",{"type":21,"tag":62,"props":899,"children":900},{"style":79},[901],{"type":27,"value":99},{"type":21,"tag":62,"props":903,"children":904},{"style":85},[905],{"type":27,"value":906},"int",{"type":21,"tag":62,"props":908,"children":909},{"style":85},[910],{"type":27,"value":911}," ...",{"type":21,"tag":62,"props":913,"children":914},{"style":79},[915],{"type":27,"value":916},"$numbers)",{"type":21,"tag":62,"props":918,"children":919},{"style":85},[920],{"type":27,"value":921},":",{"type":21,"tag":62,"props":923,"children":924},{"style":85},[925],{"type":27,"value":926}," int\n",{"type":21,"tag":62,"props":928,"children":929},{"class":64,"line":75},[930],{"type":21,"tag":62,"props":931,"children":932},{"style":79},[933],{"type":27,"value":934},"{\n",{"type":21,"tag":62,"props":936,"children":937},{"class":64,"line":132},[938,943,948],{"type":21,"tag":62,"props":939,"children":940},{"style":85},[941],{"type":27,"value":942},"    return",{"type":21,"tag":62,"props":944,"children":945},{"style":91},[946],{"type":27,"value":947}," array_sum",{"type":21,"tag":62,"props":949,"children":950},{"style":79},[951],{"type":27,"value":952},"($numbers);\n",{"type":21,"tag":62,"props":954,"children":955},{"class":64,"line":142},[956],{"type":21,"tag":62,"props":957,"children":958},{"style":79},[959],{"type":27,"value":960},"}\n",{"type":21,"tag":62,"props":962,"children":963},{"class":64,"line":151},[964,969,973,977,981,985,989,993,997],{"type":21,"tag":62,"props":965,"children":966},{"style":79},[967],{"type":27,"value":968},"$nums ",{"type":21,"tag":62,"props":970,"children":971},{"style":85},[972],{"type":27,"value":88},{"type":21,"tag":62,"props":974,"children":975},{"style":79},[976],{"type":27,"value":276},{"type":21,"tag":62,"props":978,"children":979},{"style":91},[980],{"type":27,"value":281},{"type":21,"tag":62,"props":982,"children":983},{"style":79},[984],{"type":27,"value":110},{"type":21,"tag":62,"props":986,"children":987},{"style":91},[988],{"type":27,"value":290},{"type":21,"tag":62,"props":990,"children":991},{"style":79},[992],{"type":27,"value":110},{"type":21,"tag":62,"props":994,"children":995},{"style":91},[996],{"type":27,"value":299},{"type":21,"tag":62,"props":998,"children":999},{"style":79},[1000],{"type":27,"value":322},{"type":21,"tag":62,"props":1002,"children":1003},{"class":64,"line":173},[1004,1009,1013,1017,1021,1026],{"type":21,"tag":62,"props":1005,"children":1006},{"style":91},[1007],{"type":27,"value":1008},"echo",{"type":21,"tag":62,"props":1010,"children":1011},{"style":894},[1012],{"type":27,"value":897},{"type":21,"tag":62,"props":1014,"children":1015},{"style":79},[1016],{"type":27,"value":99},{"type":21,"tag":62,"props":1018,"children":1019},{"style":85},[1020],{"type":27,"value":874},{"type":21,"tag":62,"props":1022,"children":1023},{"style":79},[1024],{"type":27,"value":1025},"$nums);  ",{"type":21,"tag":62,"props":1027,"children":1028},{"style":69},[1029],{"type":27,"value":1030},"\u002F\u002F Outputs: 6\n",{"type":21,"tag":22,"props":1032,"children":1034},{"id":1033},"array-destructuring",[1035],{"type":27,"value":1036},"Array Destructuring",{"type":21,"tag":30,"props":1038,"children":1039},{},[1040],{"type":27,"value":1041},"Array destructuring allows you to assign array values to variables in a single statement.",{"type":21,"tag":53,"props":1043,"children":1045},{"className":55,"code":1044,"language":12,"meta":8,"style":8},"\u002F\u002F Indexed array destructuring\n$coordinates = [40.7128, -74.0060];\n[$lat, $lng] = $coordinates;\n\n\u002F\u002F Named keys\n$person = ['name' => 'John', 'age' => 30];\n['name' => $name, 'age' => $age] = $person;\n",[1046],{"type":21,"tag":36,"props":1047,"children":1048},{"__ignoreMap":8},[1049,1057,1096,1113,1120,1128,1177],{"type":21,"tag":62,"props":1050,"children":1051},{"class":64,"line":65},[1052],{"type":21,"tag":62,"props":1053,"children":1054},{"style":69},[1055],{"type":27,"value":1056},"\u002F\u002F Indexed array destructuring\n",{"type":21,"tag":62,"props":1058,"children":1059},{"class":64,"line":75},[1060,1065,1069,1073,1078,1082,1087,1092],{"type":21,"tag":62,"props":1061,"children":1062},{"style":79},[1063],{"type":27,"value":1064},"$coordinates ",{"type":21,"tag":62,"props":1066,"children":1067},{"style":85},[1068],{"type":27,"value":88},{"type":21,"tag":62,"props":1070,"children":1071},{"style":79},[1072],{"type":27,"value":276},{"type":21,"tag":62,"props":1074,"children":1075},{"style":91},[1076],{"type":27,"value":1077},"40.7128",{"type":21,"tag":62,"props":1079,"children":1080},{"style":79},[1081],{"type":27,"value":110},{"type":21,"tag":62,"props":1083,"children":1084},{"style":85},[1085],{"type":27,"value":1086},"-",{"type":21,"tag":62,"props":1088,"children":1089},{"style":91},[1090],{"type":27,"value":1091},"74.0060",{"type":21,"tag":62,"props":1093,"children":1094},{"style":79},[1095],{"type":27,"value":322},{"type":21,"tag":62,"props":1097,"children":1098},{"class":64,"line":132},[1099,1104,1108],{"type":21,"tag":62,"props":1100,"children":1101},{"style":79},[1102],{"type":27,"value":1103},"[$lat, $lng] ",{"type":21,"tag":62,"props":1105,"children":1106},{"style":85},[1107],{"type":27,"value":88},{"type":21,"tag":62,"props":1109,"children":1110},{"style":79},[1111],{"type":27,"value":1112}," $coordinates;\n",{"type":21,"tag":62,"props":1114,"children":1115},{"class":64,"line":142},[1116],{"type":21,"tag":62,"props":1117,"children":1118},{"emptyLinePlaceholder":136},[1119],{"type":27,"value":139},{"type":21,"tag":62,"props":1121,"children":1122},{"class":64,"line":151},[1123],{"type":21,"tag":62,"props":1124,"children":1125},{"style":69},[1126],{"type":27,"value":1127},"\u002F\u002F Named keys\n",{"type":21,"tag":62,"props":1129,"children":1130},{"class":64,"line":173},[1131,1135,1139,1143,1147,1151,1156,1160,1165,1169,1173],{"type":21,"tag":62,"props":1132,"children":1133},{"style":79},[1134],{"type":27,"value":157},{"type":21,"tag":62,"props":1136,"children":1137},{"style":85},[1138],{"type":27,"value":88},{"type":21,"tag":62,"props":1140,"children":1141},{"style":79},[1142],{"type":27,"value":276},{"type":21,"tag":62,"props":1144,"children":1145},{"style":102},[1146],{"type":27,"value":662},{"type":21,"tag":62,"props":1148,"children":1149},{"style":85},[1150],{"type":27,"value":184},{"type":21,"tag":62,"props":1152,"children":1153},{"style":102},[1154],{"type":27,"value":1155}," 'John'",{"type":21,"tag":62,"props":1157,"children":1158},{"style":79},[1159],{"type":27,"value":110},{"type":21,"tag":62,"props":1161,"children":1162},{"style":102},[1163],{"type":27,"value":1164},"'age'",{"type":21,"tag":62,"props":1166,"children":1167},{"style":85},[1168],{"type":27,"value":184},{"type":21,"tag":62,"props":1170,"children":1171},{"style":91},[1172],{"type":27,"value":212},{"type":21,"tag":62,"props":1174,"children":1175},{"style":79},[1176],{"type":27,"value":322},{"type":21,"tag":62,"props":1178,"children":1179},{"class":64,"line":197},[1180,1185,1189,1193,1198,1202,1206,1211,1215],{"type":21,"tag":62,"props":1181,"children":1182},{"style":79},[1183],{"type":27,"value":1184},"[",{"type":21,"tag":62,"props":1186,"children":1187},{"style":102},[1188],{"type":27,"value":662},{"type":21,"tag":62,"props":1190,"children":1191},{"style":85},[1192],{"type":27,"value":184},{"type":21,"tag":62,"props":1194,"children":1195},{"style":79},[1196],{"type":27,"value":1197}," $name, ",{"type":21,"tag":62,"props":1199,"children":1200},{"style":102},[1201],{"type":27,"value":1164},{"type":21,"tag":62,"props":1203,"children":1204},{"style":85},[1205],{"type":27,"value":184},{"type":21,"tag":62,"props":1207,"children":1208},{"style":79},[1209],{"type":27,"value":1210}," $age] ",{"type":21,"tag":62,"props":1212,"children":1213},{"style":85},[1214],{"type":27,"value":88},{"type":21,"tag":62,"props":1216,"children":1217},{"style":79},[1218],{"type":27,"value":1219}," $person;\n",{"type":21,"tag":1221,"props":1222,"children":1223},"style",{},[1224],{"type":27,"value":1225},"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":132,"depth":132,"links":1227},[1228,1229,1230,1231,1232,1233],{"id":24,"depth":75,"text":28},{"id":325,"depth":75,"text":328},{"id":460,"depth":75,"text":463},{"id":610,"depth":75,"text":613},{"id":860,"depth":75,"text":863},{"id":1033,"depth":75,"text":1036},"markdown","content:php:php-fundamental:array-map.md","content","php\u002Fphp-fundamental\u002Farray-map.md","php\u002Fphp-fundamental\u002Farray-map","md",{"_path":1241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":1242,"description":1243,"tags":1244,"date":15,"weight":173,"body":1247,"_type":1234,"_id":1616,"_source":1236,"_file":1617,"_stem":1618,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Fcasting-convertions","PHP Casting and Conversions","Learning about PHP casting and conversions",[12,13,1245,1246],"casting","conversions",{"type":18,"children":1248,"toc":1609},[1249,1254,1259,1266,1271,1305,1317,1427,1503,1509,1514,1594,1600,1605],{"type":21,"tag":22,"props":1250,"children":1252},{"id":1251},"php-casting-and-conversions",[1253],{"type":27,"value":1242},{"type":21,"tag":30,"props":1255,"children":1256},{},[1257],{"type":27,"value":1258},"In PHP, casting and conversions are used to change the data type of a variable. This can be done explicitly using casting operators or implicitly through type juggling. Understanding how to cast and convert data types is essential for writing robust and error-free PHP code.",{"type":21,"tag":1260,"props":1261,"children":1263},"h3",{"id":1262},"explicit-casting",[1264],{"type":27,"value":1265},"Explicit Casting",{"type":21,"tag":30,"props":1267,"children":1268},{},[1269],{"type":27,"value":1270},"You can explicitly cast a variable to a different data type using casting operators. The syntax for explicit casting is as follows:",{"type":21,"tag":53,"props":1272,"children":1274},{"className":55,"code":1273,"language":12,"meta":8,"style":8},"$variable = (type) $value;\n",[1275],{"type":21,"tag":36,"props":1276,"children":1277},{"__ignoreMap":8},[1278],{"type":21,"tag":62,"props":1279,"children":1280},{"class":64,"line":65},[1281,1286,1290,1295,1300],{"type":21,"tag":62,"props":1282,"children":1283},{"style":79},[1284],{"type":27,"value":1285},"$variable ",{"type":21,"tag":62,"props":1287,"children":1288},{"style":85},[1289],{"type":27,"value":88},{"type":21,"tag":62,"props":1291,"children":1292},{"style":79},[1293],{"type":27,"value":1294}," (",{"type":21,"tag":62,"props":1296,"children":1297},{"style":91},[1298],{"type":27,"value":1299},"type",{"type":21,"tag":62,"props":1301,"children":1302},{"style":79},[1303],{"type":27,"value":1304},") $value;\n",{"type":21,"tag":30,"props":1306,"children":1307},{},[1308,1310,1315],{"type":27,"value":1309},"Where ",{"type":21,"tag":36,"props":1311,"children":1313},{"className":1312},[],[1314],{"type":27,"value":1299},{"type":27,"value":1316}," can be one of the following:",{"type":21,"tag":1318,"props":1319,"children":1320},"ul",{},[1321,1340,1358,1369,1387,1397,1408],{"type":21,"tag":1322,"props":1323,"children":1324},"li",{},[1325,1330,1332,1338],{"type":21,"tag":36,"props":1326,"children":1328},{"className":1327},[],[1329],{"type":27,"value":906},{"type":27,"value":1331}," or ",{"type":21,"tag":36,"props":1333,"children":1335},{"className":1334},[],[1336],{"type":27,"value":1337},"integer",{"type":27,"value":1339},": Casts to an integer.",{"type":21,"tag":1322,"props":1341,"children":1342},{},[1343,1349,1350,1356],{"type":21,"tag":36,"props":1344,"children":1346},{"className":1345},[],[1347],{"type":27,"value":1348},"float",{"type":27,"value":1331},{"type":21,"tag":36,"props":1351,"children":1353},{"className":1352},[],[1354],{"type":27,"value":1355},"double",{"type":27,"value":1357},": Casts to a floating-point number.",{"type":21,"tag":1322,"props":1359,"children":1360},{},[1361,1367],{"type":21,"tag":36,"props":1362,"children":1364},{"className":1363},[],[1365],{"type":27,"value":1366},"string",{"type":27,"value":1368},": Casts to a string.",{"type":21,"tag":1322,"props":1370,"children":1371},{},[1372,1378,1379,1385],{"type":21,"tag":36,"props":1373,"children":1375},{"className":1374},[],[1376],{"type":27,"value":1377},"bool",{"type":27,"value":1331},{"type":21,"tag":36,"props":1380,"children":1382},{"className":1381},[],[1383],{"type":27,"value":1384},"boolean",{"type":27,"value":1386},": Casts to a boolean.",{"type":21,"tag":1322,"props":1388,"children":1389},{},[1390,1395],{"type":21,"tag":36,"props":1391,"children":1393},{"className":1392},[],[1394],{"type":27,"value":24},{"type":27,"value":1396},": Casts to an array.",{"type":21,"tag":1322,"props":1398,"children":1399},{},[1400,1406],{"type":21,"tag":36,"props":1401,"children":1403},{"className":1402},[],[1404],{"type":27,"value":1405},"object",{"type":27,"value":1407},": Casts to an object.",{"type":21,"tag":1322,"props":1409,"children":1410},{},[1411,1417,1419,1425],{"type":21,"tag":36,"props":1412,"children":1414},{"className":1413},[],[1415],{"type":27,"value":1416},"unset",{"type":27,"value":1418},": Casts to ",{"type":21,"tag":36,"props":1420,"children":1422},{"className":1421},[],[1423],{"type":27,"value":1424},"NULL",{"type":27,"value":1426},".",{"type":21,"tag":53,"props":1428,"children":1430},{"className":55,"code":1429,"language":12,"meta":8,"style":8},"$value = \"123\";\n$intValue = (int) $value; \u002F\u002F Casts to integer\necho $intValue; \u002F\u002F Output: 123\n",[1431],{"type":21,"tag":36,"props":1432,"children":1433},{"__ignoreMap":8},[1434,1456,1486],{"type":21,"tag":62,"props":1435,"children":1436},{"class":64,"line":65},[1437,1442,1446,1451],{"type":21,"tag":62,"props":1438,"children":1439},{"style":79},[1440],{"type":27,"value":1441},"$value ",{"type":21,"tag":62,"props":1443,"children":1444},{"style":85},[1445],{"type":27,"value":88},{"type":21,"tag":62,"props":1447,"children":1448},{"style":102},[1449],{"type":27,"value":1450}," \"123\"",{"type":21,"tag":62,"props":1452,"children":1453},{"style":79},[1454],{"type":27,"value":1455},";\n",{"type":21,"tag":62,"props":1457,"children":1458},{"class":64,"line":75},[1459,1464,1468,1472,1476,1481],{"type":21,"tag":62,"props":1460,"children":1461},{"style":79},[1462],{"type":27,"value":1463},"$intValue ",{"type":21,"tag":62,"props":1465,"children":1466},{"style":85},[1467],{"type":27,"value":88},{"type":21,"tag":62,"props":1469,"children":1470},{"style":79},[1471],{"type":27,"value":1294},{"type":21,"tag":62,"props":1473,"children":1474},{"style":85},[1475],{"type":27,"value":906},{"type":21,"tag":62,"props":1477,"children":1478},{"style":79},[1479],{"type":27,"value":1480},") $value; ",{"type":21,"tag":62,"props":1482,"children":1483},{"style":69},[1484],{"type":27,"value":1485},"\u002F\u002F Casts to integer\n",{"type":21,"tag":62,"props":1487,"children":1488},{"class":64,"line":132},[1489,1493,1498],{"type":21,"tag":62,"props":1490,"children":1491},{"style":91},[1492],{"type":27,"value":1008},{"type":21,"tag":62,"props":1494,"children":1495},{"style":79},[1496],{"type":27,"value":1497}," $intValue; ",{"type":21,"tag":62,"props":1499,"children":1500},{"style":69},[1501],{"type":27,"value":1502},"\u002F\u002F Output: 123\n",{"type":21,"tag":1260,"props":1504,"children":1506},{"id":1505},"implicit-conversions",[1507],{"type":27,"value":1508},"Implicit Conversions",{"type":21,"tag":30,"props":1510,"children":1511},{},[1512],{"type":27,"value":1513},"PHP also performs implicit conversions, also known as type juggling, when it encounters a situation where a specific data type is expected. For example, when you use a string in a mathematical operation, PHP will automatically convert it to a number if possible.",{"type":21,"tag":53,"props":1515,"children":1517},{"className":55,"code":1516,"language":12,"meta":8,"style":8},"$value = \"10\";\n$result = $value + 5; \u002F\u002F Implicitly converts \"10\" to 10\necho $result; \u002F\u002F Output: 15\n",[1518],{"type":21,"tag":36,"props":1519,"children":1520},{"__ignoreMap":8},[1521,1541,1577],{"type":21,"tag":62,"props":1522,"children":1523},{"class":64,"line":65},[1524,1528,1532,1537],{"type":21,"tag":62,"props":1525,"children":1526},{"style":79},[1527],{"type":27,"value":1441},{"type":21,"tag":62,"props":1529,"children":1530},{"style":85},[1531],{"type":27,"value":88},{"type":21,"tag":62,"props":1533,"children":1534},{"style":102},[1535],{"type":27,"value":1536}," \"10\"",{"type":21,"tag":62,"props":1538,"children":1539},{"style":79},[1540],{"type":27,"value":1455},{"type":21,"tag":62,"props":1542,"children":1543},{"class":64,"line":75},[1544,1549,1553,1558,1562,1567,1572],{"type":21,"tag":62,"props":1545,"children":1546},{"style":79},[1547],{"type":27,"value":1548},"$result ",{"type":21,"tag":62,"props":1550,"children":1551},{"style":85},[1552],{"type":27,"value":88},{"type":21,"tag":62,"props":1554,"children":1555},{"style":79},[1556],{"type":27,"value":1557}," $value ",{"type":21,"tag":62,"props":1559,"children":1560},{"style":85},[1561],{"type":27,"value":826},{"type":21,"tag":62,"props":1563,"children":1564},{"style":91},[1565],{"type":27,"value":1566}," 5",{"type":21,"tag":62,"props":1568,"children":1569},{"style":79},[1570],{"type":27,"value":1571},"; ",{"type":21,"tag":62,"props":1573,"children":1574},{"style":69},[1575],{"type":27,"value":1576},"\u002F\u002F Implicitly converts \"10\" to 10\n",{"type":21,"tag":62,"props":1578,"children":1579},{"class":64,"line":132},[1580,1584,1589],{"type":21,"tag":62,"props":1581,"children":1582},{"style":91},[1583],{"type":27,"value":1008},{"type":21,"tag":62,"props":1585,"children":1586},{"style":79},[1587],{"type":27,"value":1588}," $result; ",{"type":21,"tag":62,"props":1590,"children":1591},{"style":69},[1592],{"type":27,"value":1593},"\u002F\u002F Output: 15\n",{"type":21,"tag":1260,"props":1595,"children":1597},{"id":1596},"conclusion",[1598],{"type":27,"value":1599},"Conclusion",{"type":21,"tag":30,"props":1601,"children":1602},{},[1603],{"type":27,"value":1604},"Understanding PHP casting and conversions is crucial for managing data types effectively in your applications. Whether you need to explicitly cast a variable or rely on implicit conversions, being aware of how PHP handles data types will help you avoid common pitfalls and write more efficient code. Always consider the context in which you are working with variables and choose the appropriate casting or conversion method to ensure your code behaves as expected.",{"type":21,"tag":1221,"props":1606,"children":1607},{},[1608],{"type":27,"value":1225},{"title":8,"searchDepth":132,"depth":132,"links":1610},[1611],{"id":1251,"depth":75,"text":1242,"children":1612},[1613,1614,1615],{"id":1262,"depth":132,"text":1265},{"id":1505,"depth":132,"text":1508},{"id":1596,"depth":132,"text":1599},"content:php:php-fundamental:casting-convertions.md","php\u002Fphp-fundamental\u002Fcasting-convertions.md","php\u002Fphp-fundamental\u002Fcasting-convertions",{"_path":1620,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":1621,"description":1622,"tags":1623,"date":15,"weight":132,"body":1625,"_type":1234,"_id":1936,"_source":1236,"_file":1937,"_stem":1938,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Fcomments","PHP Comments","Essential PHP comment operations",[12,13,1624],"comments",{"type":18,"children":1626,"toc":1932},[1627,1632,1637,1661,1684,1708,1747,1769,1919,1923,1928],{"type":21,"tag":22,"props":1628,"children":1629},{"id":1624},[1630],{"type":27,"value":1631},"Comments",{"type":21,"tag":30,"props":1633,"children":1634},{},[1635],{"type":27,"value":1636},"In PHP, comments are used to explain code and make it more readable. There are three types of comments in PHP:",{"type":21,"tag":1638,"props":1639,"children":1640},"ol",{},[1641],{"type":21,"tag":1322,"props":1642,"children":1643},{},[1644,1646,1652,1653,1659],{"type":27,"value":1645},"Single-line comments: These comments start with ",{"type":21,"tag":36,"props":1647,"children":1649},{"className":1648},[],[1650],{"type":27,"value":1651},"\u002F\u002F",{"type":27,"value":1331},{"type":21,"tag":36,"props":1654,"children":1656},{"className":1655},[],[1657],{"type":27,"value":1658},"#",{"type":27,"value":1660}," and continue until the end of the line.",{"type":21,"tag":53,"props":1662,"children":1664},{"className":55,"code":1663,"language":12,"meta":8,"style":8},"\u002F\u002F This is a single-line comment using double slashes\n# This is a single-line comment using a hash\n",[1665],{"type":21,"tag":36,"props":1666,"children":1667},{"__ignoreMap":8},[1668,1676],{"type":21,"tag":62,"props":1669,"children":1670},{"class":64,"line":65},[1671],{"type":21,"tag":62,"props":1672,"children":1673},{"style":69},[1674],{"type":27,"value":1675},"\u002F\u002F This is a single-line comment using double slashes\n",{"type":21,"tag":62,"props":1677,"children":1678},{"class":64,"line":75},[1679],{"type":21,"tag":62,"props":1680,"children":1681},{"style":69},[1682],{"type":27,"value":1683},"# This is a single-line comment using a hash\n",{"type":21,"tag":1638,"props":1685,"children":1686},{"start":75},[1687],{"type":21,"tag":1322,"props":1688,"children":1689},{},[1690,1692,1698,1700,1706],{"type":27,"value":1691},"Multi-line comments: These comments start with ",{"type":21,"tag":36,"props":1693,"children":1695},{"className":1694},[],[1696],{"type":27,"value":1697},"\u002F*",{"type":27,"value":1699}," and end with ",{"type":21,"tag":36,"props":1701,"children":1703},{"className":1702},[],[1704],{"type":27,"value":1705},"*\u002F",{"type":27,"value":1707},". They can span multiple lines.",{"type":21,"tag":53,"props":1709,"children":1711},{"className":55,"code":1710,"language":12,"meta":8,"style":8},"\u002F*\nThis is a multi-line comment.\nIt can span multiple lines.\n*\u002F\n",[1712],{"type":21,"tag":36,"props":1713,"children":1714},{"__ignoreMap":8},[1715,1723,1731,1739],{"type":21,"tag":62,"props":1716,"children":1717},{"class":64,"line":65},[1718],{"type":21,"tag":62,"props":1719,"children":1720},{"style":69},[1721],{"type":27,"value":1722},"\u002F*\n",{"type":21,"tag":62,"props":1724,"children":1725},{"class":64,"line":75},[1726],{"type":21,"tag":62,"props":1727,"children":1728},{"style":69},[1729],{"type":27,"value":1730},"This is a multi-line comment.\n",{"type":21,"tag":62,"props":1732,"children":1733},{"class":64,"line":132},[1734],{"type":21,"tag":62,"props":1735,"children":1736},{"style":69},[1737],{"type":27,"value":1738},"It can span multiple lines.\n",{"type":21,"tag":62,"props":1740,"children":1741},{"class":64,"line":142},[1742],{"type":21,"tag":62,"props":1743,"children":1744},{"style":69},[1745],{"type":27,"value":1746},"*\u002F\n",{"type":21,"tag":1638,"props":1748,"children":1749},{"start":132},[1750],{"type":21,"tag":1322,"props":1751,"children":1752},{},[1753,1755,1761,1762,1767],{"type":27,"value":1754},"Doc comments: These comments start with ",{"type":21,"tag":36,"props":1756,"children":1758},{"className":1757},[],[1759],{"type":27,"value":1760},"\u002F**",{"type":27,"value":1699},{"type":21,"tag":36,"props":1763,"children":1765},{"className":1764},[],[1766],{"type":27,"value":1705},{"type":27,"value":1768},". They are used for documentation purposes and can be parsed by tools like PHPDoc.",{"type":21,"tag":53,"props":1770,"children":1772},{"className":55,"code":1771,"language":12,"meta":8,"style":8},"\u002F**\n * This is a doc comment.\n * It can be used to generate documentation.\n *\n * @param string $name The name of the person\n * @return string A greeting message\n *\u002F\nfunction greet($name) {\n    return \"Hello, \" . $name . \"!\";\n}\n",[1773],{"type":21,"tag":36,"props":1774,"children":1775},{"__ignoreMap":8},[1776,1784,1792,1800,1808,1831,1852,1860,1877,1912],{"type":21,"tag":62,"props":1777,"children":1778},{"class":64,"line":65},[1779],{"type":21,"tag":62,"props":1780,"children":1781},{"style":69},[1782],{"type":27,"value":1783},"\u002F**\n",{"type":21,"tag":62,"props":1785,"children":1786},{"class":64,"line":75},[1787],{"type":21,"tag":62,"props":1788,"children":1789},{"style":69},[1790],{"type":27,"value":1791}," * This is a doc comment.\n",{"type":21,"tag":62,"props":1793,"children":1794},{"class":64,"line":132},[1795],{"type":21,"tag":62,"props":1796,"children":1797},{"style":69},[1798],{"type":27,"value":1799}," * It can be used to generate documentation.\n",{"type":21,"tag":62,"props":1801,"children":1802},{"class":64,"line":142},[1803],{"type":21,"tag":62,"props":1804,"children":1805},{"style":69},[1806],{"type":27,"value":1807}," *\n",{"type":21,"tag":62,"props":1809,"children":1810},{"class":64,"line":151},[1811,1816,1821,1826],{"type":21,"tag":62,"props":1812,"children":1813},{"style":69},[1814],{"type":27,"value":1815}," * ",{"type":21,"tag":62,"props":1817,"children":1818},{"style":85},[1819],{"type":27,"value":1820},"@param",{"type":21,"tag":62,"props":1822,"children":1823},{"style":85},[1824],{"type":27,"value":1825}," string",{"type":21,"tag":62,"props":1827,"children":1828},{"style":69},[1829],{"type":27,"value":1830}," $name The name of the person\n",{"type":21,"tag":62,"props":1832,"children":1833},{"class":64,"line":173},[1834,1838,1843,1847],{"type":21,"tag":62,"props":1835,"children":1836},{"style":69},[1837],{"type":27,"value":1815},{"type":21,"tag":62,"props":1839,"children":1840},{"style":85},[1841],{"type":27,"value":1842},"@return",{"type":21,"tag":62,"props":1844,"children":1845},{"style":85},[1846],{"type":27,"value":1825},{"type":21,"tag":62,"props":1848,"children":1849},{"style":69},[1850],{"type":27,"value":1851}," A greeting message\n",{"type":21,"tag":62,"props":1853,"children":1854},{"class":64,"line":197},[1855],{"type":21,"tag":62,"props":1856,"children":1857},{"style":69},[1858],{"type":27,"value":1859}," *\u002F\n",{"type":21,"tag":62,"props":1861,"children":1862},{"class":64,"line":219},[1863,1867,1872],{"type":21,"tag":62,"props":1864,"children":1865},{"style":85},[1866],{"type":27,"value":891},{"type":21,"tag":62,"props":1868,"children":1869},{"style":894},[1870],{"type":27,"value":1871}," greet",{"type":21,"tag":62,"props":1873,"children":1874},{"style":79},[1875],{"type":27,"value":1876},"($name) {\n",{"type":21,"tag":62,"props":1878,"children":1879},{"class":64,"line":16},[1880,1884,1889,1894,1899,1903,1908],{"type":21,"tag":62,"props":1881,"children":1882},{"style":85},[1883],{"type":27,"value":942},{"type":21,"tag":62,"props":1885,"children":1886},{"style":102},[1887],{"type":27,"value":1888}," \"Hello, \"",{"type":21,"tag":62,"props":1890,"children":1891},{"style":85},[1892],{"type":27,"value":1893}," .",{"type":21,"tag":62,"props":1895,"children":1896},{"style":79},[1897],{"type":27,"value":1898}," $name ",{"type":21,"tag":62,"props":1900,"children":1901},{"style":85},[1902],{"type":27,"value":1426},{"type":21,"tag":62,"props":1904,"children":1905},{"style":102},[1906],{"type":27,"value":1907}," \"!\"",{"type":21,"tag":62,"props":1909,"children":1910},{"style":79},[1911],{"type":27,"value":1455},{"type":21,"tag":62,"props":1913,"children":1914},{"class":64,"line":244},[1915],{"type":21,"tag":62,"props":1916,"children":1917},{"style":79},[1918],{"type":27,"value":960},{"type":21,"tag":22,"props":1920,"children":1921},{"id":1596},[1922],{"type":27,"value":1599},{"type":21,"tag":30,"props":1924,"children":1925},{},[1926],{"type":27,"value":1927},"Using comments effectively can help improve the readability and maintainability of your PHP code. It is a good practice to include comments that explain the purpose of your code, especially for complex logic or when working in a team. Always strive to write clear and concise comments that add value to your code.",{"type":21,"tag":1221,"props":1929,"children":1930},{},[1931],{"type":27,"value":1225},{"title":8,"searchDepth":132,"depth":132,"links":1933},[1934,1935],{"id":1624,"depth":75,"text":1631},{"id":1596,"depth":75,"text":1599},"content:php:php-fundamental:comments.md","php\u002Fphp-fundamental\u002Fcomments.md","php\u002Fphp-fundamental\u002Fcomments",{"_path":1940,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":1941,"description":1942,"tags":1943,"date":15,"weight":151,"body":1945,"_type":1234,"_id":3678,"_source":1236,"_file":3679,"_stem":3680,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Fdatatypes","PHP Data Types","Essential PHP data types and their usage",[12,13,1944],"data types",{"type":18,"children":1946,"toc":3662},[1947,1953,1958,2129,2135,2364,2370,2391,2480,2486,2498,2546,2552,2557,2615,2784,2790,2795,2823,2827,2912,2916,2995,3001,3006,3079,3085,3090,3142,3148,3167,3215,3221,3226,3368,3374,3379,3566,3572,3597,3658],{"type":21,"tag":22,"props":1948,"children":1950},{"id":1949},"data-types",[1951],{"type":27,"value":1952},"Data Types",{"type":21,"tag":30,"props":1954,"children":1955},{},[1956],{"type":27,"value":1957},"In PHP, a data type is a classification that specifies which type of value a variable can hold. PHP supports several data types, including:",{"type":21,"tag":1959,"props":1960,"children":1961},"table",{},[1962,1981],{"type":21,"tag":1963,"props":1964,"children":1965},"thead",{},[1966],{"type":21,"tag":1967,"props":1968,"children":1969},"tr",{},[1970,1976],{"type":21,"tag":1971,"props":1972,"children":1973},"th",{},[1974],{"type":27,"value":1975},"Type",{"type":21,"tag":1971,"props":1977,"children":1978},{},[1979],{"type":27,"value":1980},"Description",{"type":21,"tag":1982,"props":1983,"children":1984},"tbody",{},[1985,2002,2018,2034,2064,2080,2096,2112],{"type":21,"tag":1967,"props":1986,"children":1987},{},[1988,1997],{"type":21,"tag":1989,"props":1990,"children":1991},"td",{},[1992],{"type":21,"tag":36,"props":1993,"children":1995},{"className":1994},[],[1996],{"type":27,"value":906},{"type":21,"tag":1989,"props":1998,"children":1999},{},[2000],{"type":27,"value":2001},"Integer, a whole number without a decimal point.",{"type":21,"tag":1967,"props":2003,"children":2004},{},[2005,2013],{"type":21,"tag":1989,"props":2006,"children":2007},{},[2008],{"type":21,"tag":36,"props":2009,"children":2011},{"className":2010},[],[2012],{"type":27,"value":1348},{"type":21,"tag":1989,"props":2014,"children":2015},{},[2016],{"type":27,"value":2017},"Floating-point number, a number with a decimal point.",{"type":21,"tag":1967,"props":2019,"children":2020},{},[2021,2029],{"type":21,"tag":1989,"props":2022,"children":2023},{},[2024],{"type":21,"tag":36,"props":2025,"children":2027},{"className":2026},[],[2028],{"type":27,"value":1366},{"type":21,"tag":1989,"props":2030,"children":2031},{},[2032],{"type":27,"value":2033},"A sequence of characters.",{"type":21,"tag":1967,"props":2035,"children":2036},{},[2037,2045],{"type":21,"tag":1989,"props":2038,"children":2039},{},[2040],{"type":21,"tag":36,"props":2041,"children":2043},{"className":2042},[],[2044],{"type":27,"value":1377},{"type":21,"tag":1989,"props":2046,"children":2047},{},[2048,2050,2056,2057,2063],{"type":27,"value":2049},"Boolean, a value that can be either ",{"type":21,"tag":36,"props":2051,"children":2053},{"className":2052},[],[2054],{"type":27,"value":2055},"true",{"type":27,"value":1331},{"type":21,"tag":36,"props":2058,"children":2060},{"className":2059},[],[2061],{"type":27,"value":2062},"false",{"type":27,"value":1426},{"type":21,"tag":1967,"props":2065,"children":2066},{},[2067,2075],{"type":21,"tag":1989,"props":2068,"children":2069},{},[2070],{"type":21,"tag":36,"props":2071,"children":2073},{"className":2072},[],[2074],{"type":27,"value":24},{"type":21,"tag":1989,"props":2076,"children":2077},{},[2078],{"type":27,"value":2079},"An ordered map of key-value pairs.",{"type":21,"tag":1967,"props":2081,"children":2082},{},[2083,2091],{"type":21,"tag":1989,"props":2084,"children":2085},{},[2086],{"type":21,"tag":36,"props":2087,"children":2089},{"className":2088},[],[2090],{"type":27,"value":1405},{"type":21,"tag":1989,"props":2092,"children":2093},{},[2094],{"type":27,"value":2095},"An instance of a class.",{"type":21,"tag":1967,"props":2097,"children":2098},{},[2099,2107],{"type":21,"tag":1989,"props":2100,"children":2101},{},[2102],{"type":21,"tag":36,"props":2103,"children":2105},{"className":2104},[],[2106],{"type":27,"value":1424},{"type":21,"tag":1989,"props":2108,"children":2109},{},[2110],{"type":27,"value":2111},"A special type that represents a variable with no value.",{"type":21,"tag":1967,"props":2113,"children":2114},{},[2115,2124],{"type":21,"tag":1989,"props":2116,"children":2117},{},[2118],{"type":21,"tag":36,"props":2119,"children":2121},{"className":2120},[],[2122],{"type":27,"value":2123},"resource",{"type":21,"tag":1989,"props":2125,"children":2126},{},[2127],{"type":27,"value":2128},"A special variable that holds a reference to an external resource.",{"type":21,"tag":1260,"props":2130,"children":2132},{"id":2131},"example-usage",[2133],{"type":27,"value":2134},"Example Usage",{"type":21,"tag":53,"props":2136,"children":2138},{"className":55,"code":2137,"language":12,"meta":8,"style":8},"$integer = 42;\n$float = 3.14;\n$string = \"Hello, World!\";\n$boolean = true;\n$array = [1, 2, 3];\nclass MyClass {\n    public $property = \"I am an object.\";\n}\n$object = new MyClass();\n$nullValue = NULL;\n",[2139],{"type":21,"tag":36,"props":2140,"children":2141},{"__ignoreMap":8},[2142,2163,2184,2205,2226,2266,2284,2310,2317,2343],{"type":21,"tag":62,"props":2143,"children":2144},{"class":64,"line":65},[2145,2150,2154,2159],{"type":21,"tag":62,"props":2146,"children":2147},{"style":79},[2148],{"type":27,"value":2149},"$integer ",{"type":21,"tag":62,"props":2151,"children":2152},{"style":85},[2153],{"type":27,"value":88},{"type":21,"tag":62,"props":2155,"children":2156},{"style":91},[2157],{"type":27,"value":2158}," 42",{"type":21,"tag":62,"props":2160,"children":2161},{"style":79},[2162],{"type":27,"value":1455},{"type":21,"tag":62,"props":2164,"children":2165},{"class":64,"line":75},[2166,2171,2175,2180],{"type":21,"tag":62,"props":2167,"children":2168},{"style":79},[2169],{"type":27,"value":2170},"$float ",{"type":21,"tag":62,"props":2172,"children":2173},{"style":85},[2174],{"type":27,"value":88},{"type":21,"tag":62,"props":2176,"children":2177},{"style":91},[2178],{"type":27,"value":2179}," 3.14",{"type":21,"tag":62,"props":2181,"children":2182},{"style":79},[2183],{"type":27,"value":1455},{"type":21,"tag":62,"props":2185,"children":2186},{"class":64,"line":132},[2187,2192,2196,2201],{"type":21,"tag":62,"props":2188,"children":2189},{"style":79},[2190],{"type":27,"value":2191},"$string ",{"type":21,"tag":62,"props":2193,"children":2194},{"style":85},[2195],{"type":27,"value":88},{"type":21,"tag":62,"props":2197,"children":2198},{"style":102},[2199],{"type":27,"value":2200}," \"Hello, World!\"",{"type":21,"tag":62,"props":2202,"children":2203},{"style":79},[2204],{"type":27,"value":1455},{"type":21,"tag":62,"props":2206,"children":2207},{"class":64,"line":142},[2208,2213,2217,2222],{"type":21,"tag":62,"props":2209,"children":2210},{"style":79},[2211],{"type":27,"value":2212},"$boolean ",{"type":21,"tag":62,"props":2214,"children":2215},{"style":85},[2216],{"type":27,"value":88},{"type":21,"tag":62,"props":2218,"children":2219},{"style":91},[2220],{"type":27,"value":2221}," true",{"type":21,"tag":62,"props":2223,"children":2224},{"style":79},[2225],{"type":27,"value":1455},{"type":21,"tag":62,"props":2227,"children":2228},{"class":64,"line":151},[2229,2234,2238,2242,2246,2250,2254,2258,2262],{"type":21,"tag":62,"props":2230,"children":2231},{"style":79},[2232],{"type":27,"value":2233},"$array ",{"type":21,"tag":62,"props":2235,"children":2236},{"style":85},[2237],{"type":27,"value":88},{"type":21,"tag":62,"props":2239,"children":2240},{"style":79},[2241],{"type":27,"value":276},{"type":21,"tag":62,"props":2243,"children":2244},{"style":91},[2245],{"type":27,"value":281},{"type":21,"tag":62,"props":2247,"children":2248},{"style":79},[2249],{"type":27,"value":110},{"type":21,"tag":62,"props":2251,"children":2252},{"style":91},[2253],{"type":27,"value":290},{"type":21,"tag":62,"props":2255,"children":2256},{"style":79},[2257],{"type":27,"value":110},{"type":21,"tag":62,"props":2259,"children":2260},{"style":91},[2261],{"type":27,"value":299},{"type":21,"tag":62,"props":2263,"children":2264},{"style":79},[2265],{"type":27,"value":322},{"type":21,"tag":62,"props":2267,"children":2268},{"class":64,"line":173},[2269,2274,2279],{"type":21,"tag":62,"props":2270,"children":2271},{"style":85},[2272],{"type":27,"value":2273},"class",{"type":21,"tag":62,"props":2275,"children":2276},{"style":894},[2277],{"type":27,"value":2278}," MyClass",{"type":21,"tag":62,"props":2280,"children":2281},{"style":79},[2282],{"type":27,"value":2283}," {\n",{"type":21,"tag":62,"props":2285,"children":2286},{"class":64,"line":197},[2287,2292,2297,2301,2306],{"type":21,"tag":62,"props":2288,"children":2289},{"style":85},[2290],{"type":27,"value":2291},"    public",{"type":21,"tag":62,"props":2293,"children":2294},{"style":79},[2295],{"type":27,"value":2296}," $property ",{"type":21,"tag":62,"props":2298,"children":2299},{"style":85},[2300],{"type":27,"value":88},{"type":21,"tag":62,"props":2302,"children":2303},{"style":102},[2304],{"type":27,"value":2305}," \"I am an object.\"",{"type":21,"tag":62,"props":2307,"children":2308},{"style":79},[2309],{"type":27,"value":1455},{"type":21,"tag":62,"props":2311,"children":2312},{"class":64,"line":219},[2313],{"type":21,"tag":62,"props":2314,"children":2315},{"style":79},[2316],{"type":27,"value":960},{"type":21,"tag":62,"props":2318,"children":2319},{"class":64,"line":16},[2320,2325,2329,2334,2338],{"type":21,"tag":62,"props":2321,"children":2322},{"style":79},[2323],{"type":27,"value":2324},"$object ",{"type":21,"tag":62,"props":2326,"children":2327},{"style":85},[2328],{"type":27,"value":88},{"type":21,"tag":62,"props":2330,"children":2331},{"style":85},[2332],{"type":27,"value":2333}," new",{"type":21,"tag":62,"props":2335,"children":2336},{"style":91},[2337],{"type":27,"value":2278},{"type":21,"tag":62,"props":2339,"children":2340},{"style":79},[2341],{"type":27,"value":2342},"();\n",{"type":21,"tag":62,"props":2344,"children":2345},{"class":64,"line":244},[2346,2351,2355,2360],{"type":21,"tag":62,"props":2347,"children":2348},{"style":79},[2349],{"type":27,"value":2350},"$nullValue ",{"type":21,"tag":62,"props":2352,"children":2353},{"style":85},[2354],{"type":27,"value":88},{"type":21,"tag":62,"props":2356,"children":2357},{"style":91},[2358],{"type":27,"value":2359}," NULL",{"type":21,"tag":62,"props":2361,"children":2362},{"style":79},[2363],{"type":27,"value":1455},{"type":21,"tag":22,"props":2365,"children":2367},{"id":2366},"string-data-type",[2368],{"type":27,"value":2369},"String Data Type",{"type":21,"tag":30,"props":2371,"children":2372},{},[2373,2375,2381,2383,2389],{"type":27,"value":2374},"Strings in PHP are sequences of characters enclosed in either single quotes (",{"type":21,"tag":36,"props":2376,"children":2378},{"className":2377},[],[2379],{"type":27,"value":2380},"'",{"type":27,"value":2382},") or double quotes (",{"type":21,"tag":36,"props":2384,"children":2386},{"className":2385},[],[2387],{"type":27,"value":2388},"\"",{"type":27,"value":2390},"). The choice between single and double quotes affects how the string is processed, particularly with regard to variable interpolation and escape sequences.",{"type":21,"tag":53,"props":2392,"children":2394},{"className":55,"code":2393,"language":12,"meta":8,"style":8},"$name = \"John\";\n$message1 = \"Hello, $name!\"; \u002F\u002F Parses variable\n$message2 = 'Hello, $name!'; \u002F\u002F Literal string\n",[2395],{"type":21,"tag":36,"props":2396,"children":2397},{"__ignoreMap":8},[2398,2418,2454],{"type":21,"tag":62,"props":2399,"children":2400},{"class":64,"line":65},[2401,2406,2410,2414],{"type":21,"tag":62,"props":2402,"children":2403},{"style":79},[2404],{"type":27,"value":2405},"$name ",{"type":21,"tag":62,"props":2407,"children":2408},{"style":85},[2409],{"type":27,"value":88},{"type":21,"tag":62,"props":2411,"children":2412},{"style":102},[2413],{"type":27,"value":189},{"type":21,"tag":62,"props":2415,"children":2416},{"style":79},[2417],{"type":27,"value":1455},{"type":21,"tag":62,"props":2419,"children":2420},{"class":64,"line":75},[2421,2426,2430,2435,2440,2445,2449],{"type":21,"tag":62,"props":2422,"children":2423},{"style":79},[2424],{"type":27,"value":2425},"$message1 ",{"type":21,"tag":62,"props":2427,"children":2428},{"style":85},[2429],{"type":27,"value":88},{"type":21,"tag":62,"props":2431,"children":2432},{"style":102},[2433],{"type":27,"value":2434}," \"Hello, ",{"type":21,"tag":62,"props":2436,"children":2437},{"style":79},[2438],{"type":27,"value":2439},"$name",{"type":21,"tag":62,"props":2441,"children":2442},{"style":102},[2443],{"type":27,"value":2444},"!\"",{"type":21,"tag":62,"props":2446,"children":2447},{"style":79},[2448],{"type":27,"value":1571},{"type":21,"tag":62,"props":2450,"children":2451},{"style":69},[2452],{"type":27,"value":2453},"\u002F\u002F Parses variable\n",{"type":21,"tag":62,"props":2455,"children":2456},{"class":64,"line":132},[2457,2462,2466,2471,2475],{"type":21,"tag":62,"props":2458,"children":2459},{"style":79},[2460],{"type":27,"value":2461},"$message2 ",{"type":21,"tag":62,"props":2463,"children":2464},{"style":85},[2465],{"type":27,"value":88},{"type":21,"tag":62,"props":2467,"children":2468},{"style":102},[2469],{"type":27,"value":2470}," 'Hello, $name!'",{"type":21,"tag":62,"props":2472,"children":2473},{"style":79},[2474],{"type":27,"value":1571},{"type":21,"tag":62,"props":2476,"children":2477},{"style":69},[2478],{"type":27,"value":2479},"\u002F\u002F Literal string\n",{"type":21,"tag":1260,"props":2481,"children":2483},{"id":2482},"string-concatenation",[2484],{"type":27,"value":2485},"String Concatenation",{"type":21,"tag":30,"props":2487,"children":2488},{},[2489,2491,2496],{"type":27,"value":2490},"You can concatenate strings using the dot operator (",{"type":21,"tag":36,"props":2492,"children":2494},{"className":2493},[],[2495],{"type":27,"value":1426},{"type":27,"value":2497},"):",{"type":21,"tag":53,"props":2499,"children":2501},{"className":55,"code":2500,"language":12,"meta":8,"style":8},"$greeting = \"Hello, \" . $name . \"!\"; \u002F\u002F \"Hello, John!\"\n",[2502],{"type":21,"tag":36,"props":2503,"children":2504},{"__ignoreMap":8},[2505],{"type":21,"tag":62,"props":2506,"children":2507},{"class":64,"line":65},[2508,2513,2517,2521,2525,2529,2533,2537,2541],{"type":21,"tag":62,"props":2509,"children":2510},{"style":79},[2511],{"type":27,"value":2512},"$greeting ",{"type":21,"tag":62,"props":2514,"children":2515},{"style":85},[2516],{"type":27,"value":88},{"type":21,"tag":62,"props":2518,"children":2519},{"style":102},[2520],{"type":27,"value":1888},{"type":21,"tag":62,"props":2522,"children":2523},{"style":85},[2524],{"type":27,"value":1893},{"type":21,"tag":62,"props":2526,"children":2527},{"style":79},[2528],{"type":27,"value":1898},{"type":21,"tag":62,"props":2530,"children":2531},{"style":85},[2532],{"type":27,"value":1426},{"type":21,"tag":62,"props":2534,"children":2535},{"style":102},[2536],{"type":27,"value":1907},{"type":21,"tag":62,"props":2538,"children":2539},{"style":79},[2540],{"type":27,"value":1571},{"type":21,"tag":62,"props":2542,"children":2543},{"style":69},[2544],{"type":27,"value":2545},"\u002F\u002F \"Hello, John!\"\n",{"type":21,"tag":1260,"props":2547,"children":2549},{"id":2548},"string-manipulation-functions",[2550],{"type":27,"value":2551},"String Manipulation Functions",{"type":21,"tag":30,"props":2553,"children":2554},{},[2555],{"type":27,"value":2556},"PHP provides a wide range of built-in functions for string manipulation. Here are some common ones:",{"type":21,"tag":1318,"props":2558,"children":2559},{},[2560,2571,2582,2593,2604],{"type":21,"tag":1322,"props":2561,"children":2562},{},[2563,2569],{"type":21,"tag":36,"props":2564,"children":2566},{"className":2565},[],[2567],{"type":27,"value":2568},"strlen()",{"type":27,"value":2570},": Get the length of a string.",{"type":21,"tag":1322,"props":2572,"children":2573},{},[2574,2580],{"type":21,"tag":36,"props":2575,"children":2577},{"className":2576},[],[2578],{"type":27,"value":2579},"strtolower()",{"type":27,"value":2581},": Convert a string to lowercase.",{"type":21,"tag":1322,"props":2583,"children":2584},{},[2585,2591],{"type":21,"tag":36,"props":2586,"children":2588},{"className":2587},[],[2589],{"type":27,"value":2590},"strtoupper()",{"type":27,"value":2592},": Convert a string to uppercase.",{"type":21,"tag":1322,"props":2594,"children":2595},{},[2596,2602],{"type":21,"tag":36,"props":2597,"children":2599},{"className":2598},[],[2600],{"type":27,"value":2601},"substr()",{"type":27,"value":2603},": Get a substring from a string.",{"type":21,"tag":1322,"props":2605,"children":2606},{},[2607,2613],{"type":21,"tag":36,"props":2608,"children":2610},{"className":2609},[],[2611],{"type":27,"value":2612},"str_replace()",{"type":27,"value":2614},": Replace all occurrences of a search string with a replacement string.",{"type":21,"tag":53,"props":2616,"children":2618},{"className":55,"code":2617,"language":12,"meta":8,"style":8},"$string = \"Hello, World!\";\necho strlen($string); \u002F\u002F 13\necho strtolower($string); \u002F\u002F \"hello, world!\"\necho strtoupper($string); \u002F\u002F \"HELLO, WORLD!\"\necho substr($string, 0, 5); \u002F\u002F \"Hello\"\necho str_replace(\"World\", \"PHP\", $string); \u002F\u002F \"Hello, PHP!\"\n",[2619],{"type":21,"tag":36,"props":2620,"children":2621},{"__ignoreMap":8},[2622,2641,2663,2684,2705,2744],{"type":21,"tag":62,"props":2623,"children":2624},{"class":64,"line":65},[2625,2629,2633,2637],{"type":21,"tag":62,"props":2626,"children":2627},{"style":79},[2628],{"type":27,"value":2191},{"type":21,"tag":62,"props":2630,"children":2631},{"style":85},[2632],{"type":27,"value":88},{"type":21,"tag":62,"props":2634,"children":2635},{"style":102},[2636],{"type":27,"value":2200},{"type":21,"tag":62,"props":2638,"children":2639},{"style":79},[2640],{"type":27,"value":1455},{"type":21,"tag":62,"props":2642,"children":2643},{"class":64,"line":75},[2644,2648,2653,2658],{"type":21,"tag":62,"props":2645,"children":2646},{"style":91},[2647],{"type":27,"value":1008},{"type":21,"tag":62,"props":2649,"children":2650},{"style":91},[2651],{"type":27,"value":2652}," strlen",{"type":21,"tag":62,"props":2654,"children":2655},{"style":79},[2656],{"type":27,"value":2657},"($string); ",{"type":21,"tag":62,"props":2659,"children":2660},{"style":69},[2661],{"type":27,"value":2662},"\u002F\u002F 13\n",{"type":21,"tag":62,"props":2664,"children":2665},{"class":64,"line":132},[2666,2670,2675,2679],{"type":21,"tag":62,"props":2667,"children":2668},{"style":91},[2669],{"type":27,"value":1008},{"type":21,"tag":62,"props":2671,"children":2672},{"style":91},[2673],{"type":27,"value":2674}," strtolower",{"type":21,"tag":62,"props":2676,"children":2677},{"style":79},[2678],{"type":27,"value":2657},{"type":21,"tag":62,"props":2680,"children":2681},{"style":69},[2682],{"type":27,"value":2683},"\u002F\u002F \"hello, world!\"\n",{"type":21,"tag":62,"props":2685,"children":2686},{"class":64,"line":142},[2687,2691,2696,2700],{"type":21,"tag":62,"props":2688,"children":2689},{"style":91},[2690],{"type":27,"value":1008},{"type":21,"tag":62,"props":2692,"children":2693},{"style":91},[2694],{"type":27,"value":2695}," strtoupper",{"type":21,"tag":62,"props":2697,"children":2698},{"style":79},[2699],{"type":27,"value":2657},{"type":21,"tag":62,"props":2701,"children":2702},{"style":69},[2703],{"type":27,"value":2704},"\u002F\u002F \"HELLO, WORLD!\"\n",{"type":21,"tag":62,"props":2706,"children":2707},{"class":64,"line":151},[2708,2712,2717,2722,2726,2730,2734,2739],{"type":21,"tag":62,"props":2709,"children":2710},{"style":91},[2711],{"type":27,"value":1008},{"type":21,"tag":62,"props":2713,"children":2714},{"style":91},[2715],{"type":27,"value":2716}," substr",{"type":21,"tag":62,"props":2718,"children":2719},{"style":79},[2720],{"type":27,"value":2721},"($string, ",{"type":21,"tag":62,"props":2723,"children":2724},{"style":91},[2725],{"type":27,"value":845},{"type":21,"tag":62,"props":2727,"children":2728},{"style":79},[2729],{"type":27,"value":110},{"type":21,"tag":62,"props":2731,"children":2732},{"style":91},[2733],{"type":27,"value":317},{"type":21,"tag":62,"props":2735,"children":2736},{"style":79},[2737],{"type":27,"value":2738},"); ",{"type":21,"tag":62,"props":2740,"children":2741},{"style":69},[2742],{"type":27,"value":2743},"\u002F\u002F \"Hello\"\n",{"type":21,"tag":62,"props":2745,"children":2746},{"class":64,"line":173},[2747,2751,2756,2760,2765,2769,2774,2779],{"type":21,"tag":62,"props":2748,"children":2749},{"style":91},[2750],{"type":27,"value":1008},{"type":21,"tag":62,"props":2752,"children":2753},{"style":91},[2754],{"type":27,"value":2755}," str_replace",{"type":21,"tag":62,"props":2757,"children":2758},{"style":79},[2759],{"type":27,"value":99},{"type":21,"tag":62,"props":2761,"children":2762},{"style":102},[2763],{"type":27,"value":2764},"\"World\"",{"type":21,"tag":62,"props":2766,"children":2767},{"style":79},[2768],{"type":27,"value":110},{"type":21,"tag":62,"props":2770,"children":2771},{"style":102},[2772],{"type":27,"value":2773},"\"PHP\"",{"type":21,"tag":62,"props":2775,"children":2776},{"style":79},[2777],{"type":27,"value":2778},", $string); ",{"type":21,"tag":62,"props":2780,"children":2781},{"style":69},[2782],{"type":27,"value":2783},"\u002F\u002F \"Hello, PHP!\"\n",{"type":21,"tag":1260,"props":2785,"children":2787},{"id":2786},"heredoc-and-nowdoc",[2788],{"type":27,"value":2789},"Heredoc and Nowdoc",{"type":21,"tag":30,"props":2791,"children":2792},{},[2793],{"type":27,"value":2794},"Heredoc and Nowdoc are special string syntaxes in PHP that allow for multi-line strings without the need for concatenation.",{"type":21,"tag":30,"props":2796,"children":2797},{},[2798,2799,2805,2807,2813,2815,2821],{"type":27,"value":333},{"type":21,"tag":36,"props":2800,"children":2802},{"className":2801},[],[2803],{"type":27,"value":2804},"Heredoc",{"type":27,"value":2806}," syntax ",{"type":21,"tag":2808,"props":2809,"children":2810},"strong",{},[2811],{"type":27,"value":2812},"allows",{"type":27,"value":2814}," for variable parsing and special characters, while the ",{"type":21,"tag":36,"props":2816,"children":2818},{"className":2817},[],[2819],{"type":27,"value":2820},"Nowdoc",{"type":27,"value":2822}," syntax treats the string as literal text without parsing.",{"type":21,"tag":30,"props":2824,"children":2825},{},[2826],{"type":27,"value":2804},{"type":21,"tag":53,"props":2828,"children":2830},{"className":55,"code":2829,"language":12,"meta":8,"style":8},"$name = \"John\";\n$heredoc = \u003C\u003C\u003CEOD\nThis is a heredoc string. It can span multiple lines and parse variables like $name.\nEOD;\n\u002F\u002F Output: This is a heredoc string. It can span multiple lines and parse variables like John.\n",[2831],{"type":21,"tag":36,"props":2832,"children":2833},{"__ignoreMap":8},[2834,2853,2875,2892,2904],{"type":21,"tag":62,"props":2835,"children":2836},{"class":64,"line":65},[2837,2841,2845,2849],{"type":21,"tag":62,"props":2838,"children":2839},{"style":79},[2840],{"type":27,"value":2405},{"type":21,"tag":62,"props":2842,"children":2843},{"style":85},[2844],{"type":27,"value":88},{"type":21,"tag":62,"props":2846,"children":2847},{"style":102},[2848],{"type":27,"value":189},{"type":21,"tag":62,"props":2850,"children":2851},{"style":79},[2852],{"type":27,"value":1455},{"type":21,"tag":62,"props":2854,"children":2855},{"class":64,"line":75},[2856,2861,2865,2870],{"type":21,"tag":62,"props":2857,"children":2858},{"style":79},[2859],{"type":27,"value":2860},"$heredoc ",{"type":21,"tag":62,"props":2862,"children":2863},{"style":85},[2864],{"type":27,"value":88},{"type":21,"tag":62,"props":2866,"children":2867},{"style":102},[2868],{"type":27,"value":2869}," \u003C\u003C\u003C",{"type":21,"tag":62,"props":2871,"children":2872},{"style":85},[2873],{"type":27,"value":2874},"EOD\n",{"type":21,"tag":62,"props":2876,"children":2877},{"class":64,"line":132},[2878,2883,2887],{"type":21,"tag":62,"props":2879,"children":2880},{"style":102},[2881],{"type":27,"value":2882},"This is a heredoc string. It can span multiple lines and parse variables like ",{"type":21,"tag":62,"props":2884,"children":2885},{"style":79},[2886],{"type":27,"value":2439},{"type":21,"tag":62,"props":2888,"children":2889},{"style":102},[2890],{"type":27,"value":2891},".\n",{"type":21,"tag":62,"props":2893,"children":2894},{"class":64,"line":142},[2895,2900],{"type":21,"tag":62,"props":2896,"children":2897},{"style":85},[2898],{"type":27,"value":2899},"EOD",{"type":21,"tag":62,"props":2901,"children":2902},{"style":79},[2903],{"type":27,"value":1455},{"type":21,"tag":62,"props":2905,"children":2906},{"class":64,"line":151},[2907],{"type":21,"tag":62,"props":2908,"children":2909},{"style":69},[2910],{"type":27,"value":2911},"\u002F\u002F Output: This is a heredoc string. It can span multiple lines and parse variables like John.\n",{"type":21,"tag":30,"props":2913,"children":2914},{},[2915],{"type":27,"value":2820},{"type":21,"tag":53,"props":2917,"children":2919},{"className":55,"code":2918,"language":12,"meta":8,"style":8},"$name = \"John\";\n$nowdoc = \u003C\u003C\u003C'EOD'\nThis is a nowdoc string. It can span multiple lines but does not parse variables like $name.\nEOD;\n\u002F\u002F Output: This is a nowdoc string. It can span multiple lines but does not parse variables like $name.\n",[2920],{"type":21,"tag":36,"props":2921,"children":2922},{"__ignoreMap":8},[2923,2942,2968,2976,2987],{"type":21,"tag":62,"props":2924,"children":2925},{"class":64,"line":65},[2926,2930,2934,2938],{"type":21,"tag":62,"props":2927,"children":2928},{"style":79},[2929],{"type":27,"value":2405},{"type":21,"tag":62,"props":2931,"children":2932},{"style":85},[2933],{"type":27,"value":88},{"type":21,"tag":62,"props":2935,"children":2936},{"style":102},[2937],{"type":27,"value":189},{"type":21,"tag":62,"props":2939,"children":2940},{"style":79},[2941],{"type":27,"value":1455},{"type":21,"tag":62,"props":2943,"children":2944},{"class":64,"line":75},[2945,2950,2954,2959,2963],{"type":21,"tag":62,"props":2946,"children":2947},{"style":79},[2948],{"type":27,"value":2949},"$nowdoc ",{"type":21,"tag":62,"props":2951,"children":2952},{"style":85},[2953],{"type":27,"value":88},{"type":21,"tag":62,"props":2955,"children":2956},{"style":102},[2957],{"type":27,"value":2958}," \u003C\u003C\u003C'",{"type":21,"tag":62,"props":2960,"children":2961},{"style":85},[2962],{"type":27,"value":2899},{"type":21,"tag":62,"props":2964,"children":2965},{"style":102},[2966],{"type":27,"value":2967},"'\n",{"type":21,"tag":62,"props":2969,"children":2970},{"class":64,"line":132},[2971],{"type":21,"tag":62,"props":2972,"children":2973},{"style":102},[2974],{"type":27,"value":2975},"This is a nowdoc string. It can span multiple lines but does not parse variables like $name.\n",{"type":21,"tag":62,"props":2977,"children":2978},{"class":64,"line":142},[2979,2983],{"type":21,"tag":62,"props":2980,"children":2981},{"style":85},[2982],{"type":27,"value":2899},{"type":21,"tag":62,"props":2984,"children":2985},{"style":79},[2986],{"type":27,"value":1455},{"type":21,"tag":62,"props":2988,"children":2989},{"class":64,"line":151},[2990],{"type":21,"tag":62,"props":2991,"children":2992},{"style":69},[2993],{"type":27,"value":2994},"\u002F\u002F Output: This is a nowdoc string. It can span multiple lines but does not parse variables like $name.\n",{"type":21,"tag":22,"props":2996,"children":2998},{"id":2997},"integer-data-type",[2999],{"type":27,"value":3000},"Integer Data Type",{"type":21,"tag":30,"props":3002,"children":3003},{},[3004],{"type":27,"value":3005},"Integers in PHP are whole numbers without a decimal point. They can be positive, negative, or zero. The size of an integer depends on the platform, but it is typically 32 or 64 bits.",{"type":21,"tag":53,"props":3007,"children":3009},{"className":55,"code":3008,"language":12,"meta":8,"style":8},"$positiveInt = 42;\n$negativeInt = -42;\n$zeroInt = 0;\n",[3010],{"type":21,"tag":36,"props":3011,"children":3012},{"__ignoreMap":8},[3013,3033,3059],{"type":21,"tag":62,"props":3014,"children":3015},{"class":64,"line":65},[3016,3021,3025,3029],{"type":21,"tag":62,"props":3017,"children":3018},{"style":79},[3019],{"type":27,"value":3020},"$positiveInt ",{"type":21,"tag":62,"props":3022,"children":3023},{"style":85},[3024],{"type":27,"value":88},{"type":21,"tag":62,"props":3026,"children":3027},{"style":91},[3028],{"type":27,"value":2158},{"type":21,"tag":62,"props":3030,"children":3031},{"style":79},[3032],{"type":27,"value":1455},{"type":21,"tag":62,"props":3034,"children":3035},{"class":64,"line":75},[3036,3041,3045,3050,3055],{"type":21,"tag":62,"props":3037,"children":3038},{"style":79},[3039],{"type":27,"value":3040},"$negativeInt ",{"type":21,"tag":62,"props":3042,"children":3043},{"style":85},[3044],{"type":27,"value":88},{"type":21,"tag":62,"props":3046,"children":3047},{"style":85},[3048],{"type":27,"value":3049}," -",{"type":21,"tag":62,"props":3051,"children":3052},{"style":91},[3053],{"type":27,"value":3054},"42",{"type":21,"tag":62,"props":3056,"children":3057},{"style":79},[3058],{"type":27,"value":1455},{"type":21,"tag":62,"props":3060,"children":3061},{"class":64,"line":132},[3062,3067,3071,3075],{"type":21,"tag":62,"props":3063,"children":3064},{"style":79},[3065],{"type":27,"value":3066},"$zeroInt ",{"type":21,"tag":62,"props":3068,"children":3069},{"style":85},[3070],{"type":27,"value":88},{"type":21,"tag":62,"props":3072,"children":3073},{"style":91},[3074],{"type":27,"value":595},{"type":21,"tag":62,"props":3076,"children":3077},{"style":79},[3078],{"type":27,"value":1455},{"type":21,"tag":22,"props":3080,"children":3082},{"id":3081},"float-data-type",[3083],{"type":27,"value":3084},"Float Data Type",{"type":21,"tag":30,"props":3086,"children":3087},{},[3088],{"type":27,"value":3089},"Floats, also known as floating-point numbers, are numbers that contain a decimal point. They can represent a wider range of values than integers but may have precision issues due to the way they are stored in memory.",{"type":21,"tag":53,"props":3091,"children":3093},{"className":55,"code":3092,"language":12,"meta":8,"style":8},"$floatValue = 3.14;\n$negativeFloat = -3.14;\n",[3094],{"type":21,"tag":36,"props":3095,"children":3096},{"__ignoreMap":8},[3097,3117],{"type":21,"tag":62,"props":3098,"children":3099},{"class":64,"line":65},[3100,3105,3109,3113],{"type":21,"tag":62,"props":3101,"children":3102},{"style":79},[3103],{"type":27,"value":3104},"$floatValue ",{"type":21,"tag":62,"props":3106,"children":3107},{"style":85},[3108],{"type":27,"value":88},{"type":21,"tag":62,"props":3110,"children":3111},{"style":91},[3112],{"type":27,"value":2179},{"type":21,"tag":62,"props":3114,"children":3115},{"style":79},[3116],{"type":27,"value":1455},{"type":21,"tag":62,"props":3118,"children":3119},{"class":64,"line":75},[3120,3125,3129,3133,3138],{"type":21,"tag":62,"props":3121,"children":3122},{"style":79},[3123],{"type":27,"value":3124},"$negativeFloat ",{"type":21,"tag":62,"props":3126,"children":3127},{"style":85},[3128],{"type":27,"value":88},{"type":21,"tag":62,"props":3130,"children":3131},{"style":85},[3132],{"type":27,"value":3049},{"type":21,"tag":62,"props":3134,"children":3135},{"style":91},[3136],{"type":27,"value":3137},"3.14",{"type":21,"tag":62,"props":3139,"children":3140},{"style":79},[3141],{"type":27,"value":1455},{"type":21,"tag":22,"props":3143,"children":3145},{"id":3144},"boolean-data-type",[3146],{"type":27,"value":3147},"Boolean Data Type",{"type":21,"tag":30,"props":3149,"children":3150},{},[3151,3153,3158,3160,3165],{"type":27,"value":3152},"Booleans in PHP represent two possible values: ",{"type":21,"tag":36,"props":3154,"children":3156},{"className":3155},[],[3157],{"type":27,"value":2055},{"type":27,"value":3159}," and ",{"type":21,"tag":36,"props":3161,"children":3163},{"className":3162},[],[3164],{"type":27,"value":2062},{"type":27,"value":3166},". They are often used in conditional statements and logical operations.",{"type":21,"tag":53,"props":3168,"children":3170},{"className":55,"code":3169,"language":12,"meta":8,"style":8},"$isTrue = true;\n$isFalse = false;\n",[3171],{"type":21,"tag":36,"props":3172,"children":3173},{"__ignoreMap":8},[3174,3194],{"type":21,"tag":62,"props":3175,"children":3176},{"class":64,"line":65},[3177,3182,3186,3190],{"type":21,"tag":62,"props":3178,"children":3179},{"style":79},[3180],{"type":27,"value":3181},"$isTrue ",{"type":21,"tag":62,"props":3183,"children":3184},{"style":85},[3185],{"type":27,"value":88},{"type":21,"tag":62,"props":3187,"children":3188},{"style":91},[3189],{"type":27,"value":2221},{"type":21,"tag":62,"props":3191,"children":3192},{"style":79},[3193],{"type":27,"value":1455},{"type":21,"tag":62,"props":3195,"children":3196},{"class":64,"line":75},[3197,3202,3206,3211],{"type":21,"tag":62,"props":3198,"children":3199},{"style":79},[3200],{"type":27,"value":3201},"$isFalse ",{"type":21,"tag":62,"props":3203,"children":3204},{"style":85},[3205],{"type":27,"value":88},{"type":21,"tag":62,"props":3207,"children":3208},{"style":91},[3209],{"type":27,"value":3210}," false",{"type":21,"tag":62,"props":3212,"children":3213},{"style":79},[3214],{"type":27,"value":1455},{"type":21,"tag":22,"props":3216,"children":3218},{"id":3217},"array-data-type",[3219],{"type":27,"value":3220},"Array Data Type",{"type":21,"tag":30,"props":3222,"children":3223},{},[3224],{"type":27,"value":3225},"Arrays in PHP are ordered maps that can hold multiple values. They can be indexed by integers or associative keys (strings).",{"type":21,"tag":53,"props":3227,"children":3229},{"className":55,"code":3228,"language":12,"meta":8,"style":8},"\u002F\u002F Indexed array\n$fruits = [\"Apple\", \"Banana\", \"Cherry\"];\n\n\u002F\u002F Associative array\n$person = [\n    \"name\" => \"John\",\n    \"age\" => 30,\n    \"city\" => \"New York\"\n];\n",[3230],{"type":21,"tag":36,"props":3231,"children":3232},{"__ignoreMap":8},[3233,3240,3279,3286,3293,3308,3327,3346,3361],{"type":21,"tag":62,"props":3234,"children":3235},{"class":64,"line":65},[3236],{"type":21,"tag":62,"props":3237,"children":3238},{"style":69},[3239],{"type":27,"value":72},{"type":21,"tag":62,"props":3241,"children":3242},{"class":64,"line":75},[3243,3247,3251,3255,3259,3263,3267,3271,3275],{"type":21,"tag":62,"props":3244,"children":3245},{"style":79},[3246],{"type":27,"value":82},{"type":21,"tag":62,"props":3248,"children":3249},{"style":85},[3250],{"type":27,"value":88},{"type":21,"tag":62,"props":3252,"children":3253},{"style":79},[3254],{"type":27,"value":276},{"type":21,"tag":62,"props":3256,"children":3257},{"style":102},[3258],{"type":27,"value":105},{"type":21,"tag":62,"props":3260,"children":3261},{"style":79},[3262],{"type":27,"value":110},{"type":21,"tag":62,"props":3264,"children":3265},{"style":102},[3266],{"type":27,"value":115},{"type":21,"tag":62,"props":3268,"children":3269},{"style":79},[3270],{"type":27,"value":110},{"type":21,"tag":62,"props":3272,"children":3273},{"style":102},[3274],{"type":27,"value":124},{"type":21,"tag":62,"props":3276,"children":3277},{"style":79},[3278],{"type":27,"value":322},{"type":21,"tag":62,"props":3280,"children":3281},{"class":64,"line":132},[3282],{"type":21,"tag":62,"props":3283,"children":3284},{"emptyLinePlaceholder":136},[3285],{"type":27,"value":139},{"type":21,"tag":62,"props":3287,"children":3288},{"class":64,"line":142},[3289],{"type":21,"tag":62,"props":3290,"children":3291},{"style":69},[3292],{"type":27,"value":148},{"type":21,"tag":62,"props":3294,"children":3295},{"class":64,"line":151},[3296,3300,3304],{"type":21,"tag":62,"props":3297,"children":3298},{"style":79},[3299],{"type":27,"value":157},{"type":21,"tag":62,"props":3301,"children":3302},{"style":85},[3303],{"type":27,"value":88},{"type":21,"tag":62,"props":3305,"children":3306},{"style":79},[3307],{"type":27,"value":649},{"type":21,"tag":62,"props":3309,"children":3310},{"class":64,"line":173},[3311,3315,3319,3323],{"type":21,"tag":62,"props":3312,"children":3313},{"style":102},[3314],{"type":27,"value":179},{"type":21,"tag":62,"props":3316,"children":3317},{"style":85},[3318],{"type":27,"value":184},{"type":21,"tag":62,"props":3320,"children":3321},{"style":102},[3322],{"type":27,"value":189},{"type":21,"tag":62,"props":3324,"children":3325},{"style":79},[3326],{"type":27,"value":194},{"type":21,"tag":62,"props":3328,"children":3329},{"class":64,"line":197},[3330,3334,3338,3342],{"type":21,"tag":62,"props":3331,"children":3332},{"style":102},[3333],{"type":27,"value":203},{"type":21,"tag":62,"props":3335,"children":3336},{"style":85},[3337],{"type":27,"value":184},{"type":21,"tag":62,"props":3339,"children":3340},{"style":91},[3341],{"type":27,"value":212},{"type":21,"tag":62,"props":3343,"children":3344},{"style":79},[3345],{"type":27,"value":194},{"type":21,"tag":62,"props":3347,"children":3348},{"class":64,"line":219},[3349,3353,3357],{"type":21,"tag":62,"props":3350,"children":3351},{"style":102},[3352],{"type":27,"value":225},{"type":21,"tag":62,"props":3354,"children":3355},{"style":85},[3356],{"type":27,"value":184},{"type":21,"tag":62,"props":3358,"children":3359},{"style":102},[3360],{"type":27,"value":234},{"type":21,"tag":62,"props":3362,"children":3363},{"class":64,"line":16},[3364],{"type":21,"tag":62,"props":3365,"children":3366},{"style":79},[3367],{"type":27,"value":322},{"type":21,"tag":22,"props":3369,"children":3371},{"id":3370},"object-data-type",[3372],{"type":27,"value":3373},"Object Data Type",{"type":21,"tag":30,"props":3375,"children":3376},{},[3377],{"type":27,"value":3378},"Objects in PHP are instances of classes. They can have properties and methods that define their behavior.",{"type":21,"tag":53,"props":3380,"children":3382},{"className":55,"code":3381,"language":12,"meta":8,"style":8},"class MyClass {\n    public $property = \"I am an object.\";\n    \n    public function myMethod() {\n        return \"This is a method.\";\n    }\n}\n$object = new MyClass();\necho $object->property; \u002F\u002F Output: I am an object.\necho $object->myMethod(); \u002F\u002F Output: This is a method.\n",[3383],{"type":21,"tag":36,"props":3384,"children":3385},{"__ignoreMap":8},[3386,3401,3424,3432,3454,3471,3479,3486,3509,3536],{"type":21,"tag":62,"props":3387,"children":3388},{"class":64,"line":65},[3389,3393,3397],{"type":21,"tag":62,"props":3390,"children":3391},{"style":85},[3392],{"type":27,"value":2273},{"type":21,"tag":62,"props":3394,"children":3395},{"style":894},[3396],{"type":27,"value":2278},{"type":21,"tag":62,"props":3398,"children":3399},{"style":79},[3400],{"type":27,"value":2283},{"type":21,"tag":62,"props":3402,"children":3403},{"class":64,"line":75},[3404,3408,3412,3416,3420],{"type":21,"tag":62,"props":3405,"children":3406},{"style":85},[3407],{"type":27,"value":2291},{"type":21,"tag":62,"props":3409,"children":3410},{"style":79},[3411],{"type":27,"value":2296},{"type":21,"tag":62,"props":3413,"children":3414},{"style":85},[3415],{"type":27,"value":88},{"type":21,"tag":62,"props":3417,"children":3418},{"style":102},[3419],{"type":27,"value":2305},{"type":21,"tag":62,"props":3421,"children":3422},{"style":79},[3423],{"type":27,"value":1455},{"type":21,"tag":62,"props":3425,"children":3426},{"class":64,"line":132},[3427],{"type":21,"tag":62,"props":3428,"children":3429},{"style":79},[3430],{"type":27,"value":3431},"    \n",{"type":21,"tag":62,"props":3433,"children":3434},{"class":64,"line":142},[3435,3439,3444,3449],{"type":21,"tag":62,"props":3436,"children":3437},{"style":85},[3438],{"type":27,"value":2291},{"type":21,"tag":62,"props":3440,"children":3441},{"style":85},[3442],{"type":27,"value":3443}," function",{"type":21,"tag":62,"props":3445,"children":3446},{"style":894},[3447],{"type":27,"value":3448}," myMethod",{"type":21,"tag":62,"props":3450,"children":3451},{"style":79},[3452],{"type":27,"value":3453},"() {\n",{"type":21,"tag":62,"props":3455,"children":3456},{"class":64,"line":151},[3457,3462,3467],{"type":21,"tag":62,"props":3458,"children":3459},{"style":85},[3460],{"type":27,"value":3461},"        return",{"type":21,"tag":62,"props":3463,"children":3464},{"style":102},[3465],{"type":27,"value":3466}," \"This is a method.\"",{"type":21,"tag":62,"props":3468,"children":3469},{"style":79},[3470],{"type":27,"value":1455},{"type":21,"tag":62,"props":3472,"children":3473},{"class":64,"line":173},[3474],{"type":21,"tag":62,"props":3475,"children":3476},{"style":79},[3477],{"type":27,"value":3478},"    }\n",{"type":21,"tag":62,"props":3480,"children":3481},{"class":64,"line":197},[3482],{"type":21,"tag":62,"props":3483,"children":3484},{"style":79},[3485],{"type":27,"value":960},{"type":21,"tag":62,"props":3487,"children":3488},{"class":64,"line":219},[3489,3493,3497,3501,3505],{"type":21,"tag":62,"props":3490,"children":3491},{"style":79},[3492],{"type":27,"value":2324},{"type":21,"tag":62,"props":3494,"children":3495},{"style":85},[3496],{"type":27,"value":88},{"type":21,"tag":62,"props":3498,"children":3499},{"style":85},[3500],{"type":27,"value":2333},{"type":21,"tag":62,"props":3502,"children":3503},{"style":91},[3504],{"type":27,"value":2278},{"type":21,"tag":62,"props":3506,"children":3507},{"style":79},[3508],{"type":27,"value":2342},{"type":21,"tag":62,"props":3510,"children":3511},{"class":64,"line":16},[3512,3516,3521,3526,3531],{"type":21,"tag":62,"props":3513,"children":3514},{"style":91},[3515],{"type":27,"value":1008},{"type":21,"tag":62,"props":3517,"children":3518},{"style":79},[3519],{"type":27,"value":3520}," $object",{"type":21,"tag":62,"props":3522,"children":3523},{"style":85},[3524],{"type":27,"value":3525},"->",{"type":21,"tag":62,"props":3527,"children":3528},{"style":79},[3529],{"type":27,"value":3530},"property; ",{"type":21,"tag":62,"props":3532,"children":3533},{"style":69},[3534],{"type":27,"value":3535},"\u002F\u002F Output: I am an object.\n",{"type":21,"tag":62,"props":3537,"children":3538},{"class":64,"line":244},[3539,3543,3547,3551,3556,3561],{"type":21,"tag":62,"props":3540,"children":3541},{"style":91},[3542],{"type":27,"value":1008},{"type":21,"tag":62,"props":3544,"children":3545},{"style":79},[3546],{"type":27,"value":3520},{"type":21,"tag":62,"props":3548,"children":3549},{"style":85},[3550],{"type":27,"value":3525},{"type":21,"tag":62,"props":3552,"children":3553},{"style":894},[3554],{"type":27,"value":3555},"myMethod",{"type":21,"tag":62,"props":3557,"children":3558},{"style":79},[3559],{"type":27,"value":3560},"(); ",{"type":21,"tag":62,"props":3562,"children":3563},{"style":69},[3564],{"type":27,"value":3565},"\u002F\u002F Output: This is a method.\n",{"type":21,"tag":22,"props":3567,"children":3569},{"id":3568},"null-data-type",[3570],{"type":27,"value":3571},"NULL Data Type",{"type":21,"tag":30,"props":3573,"children":3574},{},[3575,3576,3581,3583,3588,3590,3595],{"type":27,"value":333},{"type":21,"tag":36,"props":3577,"children":3579},{"className":3578},[],[3580],{"type":27,"value":1424},{"type":27,"value":3582}," data type represents a variable with no value. A variable is considered ",{"type":21,"tag":36,"props":3584,"children":3586},{"className":3585},[],[3587],{"type":27,"value":1424},{"type":27,"value":3589}," if it has been assigned the value ",{"type":21,"tag":36,"props":3591,"children":3593},{"className":3592},[],[3594],{"type":27,"value":1424},{"type":27,"value":3596},", has not been set, or has been unset.",{"type":21,"tag":53,"props":3598,"children":3600},{"className":55,"code":3599,"language":12,"meta":8,"style":8},"$nullValue = NULL; \u002F\u002F $nullValue is explicitly set to NULL\n$unsetValue; \u002F\u002F $unsetValue is also considered NULL because it has not been set\nunset($nullValue); \u002F\u002F $nullValue is now NULL\n",[3601],{"type":21,"tag":36,"props":3602,"children":3603},{"__ignoreMap":8},[3604,3628,3641],{"type":21,"tag":62,"props":3605,"children":3606},{"class":64,"line":65},[3607,3611,3615,3619,3623],{"type":21,"tag":62,"props":3608,"children":3609},{"style":79},[3610],{"type":27,"value":2350},{"type":21,"tag":62,"props":3612,"children":3613},{"style":85},[3614],{"type":27,"value":88},{"type":21,"tag":62,"props":3616,"children":3617},{"style":91},[3618],{"type":27,"value":2359},{"type":21,"tag":62,"props":3620,"children":3621},{"style":79},[3622],{"type":27,"value":1571},{"type":21,"tag":62,"props":3624,"children":3625},{"style":69},[3626],{"type":27,"value":3627},"\u002F\u002F $nullValue is explicitly set to NULL\n",{"type":21,"tag":62,"props":3629,"children":3630},{"class":64,"line":75},[3631,3636],{"type":21,"tag":62,"props":3632,"children":3633},{"style":79},[3634],{"type":27,"value":3635},"$unsetValue; ",{"type":21,"tag":62,"props":3637,"children":3638},{"style":69},[3639],{"type":27,"value":3640},"\u002F\u002F $unsetValue is also considered NULL because it has not been set\n",{"type":21,"tag":62,"props":3642,"children":3643},{"class":64,"line":132},[3644,3648,3653],{"type":21,"tag":62,"props":3645,"children":3646},{"style":91},[3647],{"type":27,"value":1416},{"type":21,"tag":62,"props":3649,"children":3650},{"style":79},[3651],{"type":27,"value":3652},"($nullValue); ",{"type":21,"tag":62,"props":3654,"children":3655},{"style":69},[3656],{"type":27,"value":3657},"\u002F\u002F $nullValue is now NULL\n",{"type":21,"tag":1221,"props":3659,"children":3660},{},[3661],{"type":27,"value":1225},{"title":8,"searchDepth":132,"depth":132,"links":3663},[3664,3667,3672,3673,3674,3675,3676,3677],{"id":1949,"depth":75,"text":1952,"children":3665},[3666],{"id":2131,"depth":132,"text":2134},{"id":2366,"depth":75,"text":2369,"children":3668},[3669,3670,3671],{"id":2482,"depth":132,"text":2485},{"id":2548,"depth":132,"text":2551},{"id":2786,"depth":132,"text":2789},{"id":2997,"depth":75,"text":3000},{"id":3081,"depth":75,"text":3084},{"id":3144,"depth":75,"text":3147},{"id":3217,"depth":75,"text":3220},{"id":3370,"depth":75,"text":3373},{"id":3568,"depth":75,"text":3571},"content:php:php-fundamental:datatypes.md","php\u002Fphp-fundamental\u002Fdatatypes.md","php\u002Fphp-fundamental\u002Fdatatypes",{"_path":3682,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":3683,"description":3684,"tags":3685,"date":15,"weight":219,"body":3689,"_type":1234,"_id":4218,"_source":1236,"_file":4219,"_stem":4220,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Fexpression-statement-block","PHP Expressions, Statements, and Blocks","Essential PHP expressions, statements, and blocks",[12,13,3686,3687,3688],"expressions","statements","blocks",{"type":18,"children":3690,"toc":4213},[3691,3696,3701,3829,3834,3847,4030,4035,4048,4209],{"type":21,"tag":22,"props":3692,"children":3693},{"id":3686},[3694],{"type":27,"value":3695},"Expressions",{"type":21,"tag":30,"props":3697,"children":3698},{},[3699],{"type":27,"value":3700},"In PHP, an expression is a combination of values, variables, operators, and function calls that can be evaluated to produce a value. Expressions can be as simple as a single value or variable, or they can be more complex involving multiple components.",{"type":21,"tag":53,"props":3702,"children":3704},{"className":55,"code":3703,"language":12,"meta":8,"style":8},"\u002F\u002F Simple expression\n$result = 5 + 3; \u002F\u002F Evaluates to 8\n\n\u002F\u002F Complex expression\n$total = (10 * 2) + (5 \u002F 2); \u002F\u002F Evaluates to 25\n",[3705],{"type":21,"tag":36,"props":3706,"children":3707},{"__ignoreMap":8},[3708,3716,3750,3757,3765],{"type":21,"tag":62,"props":3709,"children":3710},{"class":64,"line":65},[3711],{"type":21,"tag":62,"props":3712,"children":3713},{"style":69},[3714],{"type":27,"value":3715},"\u002F\u002F Simple expression\n",{"type":21,"tag":62,"props":3717,"children":3718},{"class":64,"line":75},[3719,3723,3727,3731,3736,3741,3745],{"type":21,"tag":62,"props":3720,"children":3721},{"style":79},[3722],{"type":27,"value":1548},{"type":21,"tag":62,"props":3724,"children":3725},{"style":85},[3726],{"type":27,"value":88},{"type":21,"tag":62,"props":3728,"children":3729},{"style":91},[3730],{"type":27,"value":1566},{"type":21,"tag":62,"props":3732,"children":3733},{"style":85},[3734],{"type":27,"value":3735}," +",{"type":21,"tag":62,"props":3737,"children":3738},{"style":91},[3739],{"type":27,"value":3740}," 3",{"type":21,"tag":62,"props":3742,"children":3743},{"style":79},[3744],{"type":27,"value":1571},{"type":21,"tag":62,"props":3746,"children":3747},{"style":69},[3748],{"type":27,"value":3749},"\u002F\u002F Evaluates to 8\n",{"type":21,"tag":62,"props":3751,"children":3752},{"class":64,"line":132},[3753],{"type":21,"tag":62,"props":3754,"children":3755},{"emptyLinePlaceholder":136},[3756],{"type":27,"value":139},{"type":21,"tag":62,"props":3758,"children":3759},{"class":64,"line":142},[3760],{"type":21,"tag":62,"props":3761,"children":3762},{"style":69},[3763],{"type":27,"value":3764},"\u002F\u002F Complex expression\n",{"type":21,"tag":62,"props":3766,"children":3767},{"class":64,"line":151},[3768,3772,3776,3780,3785,3790,3794,3799,3803,3807,3811,3816,3820,3824],{"type":21,"tag":62,"props":3769,"children":3770},{"style":79},[3771],{"type":27,"value":798},{"type":21,"tag":62,"props":3773,"children":3774},{"style":85},[3775],{"type":27,"value":88},{"type":21,"tag":62,"props":3777,"children":3778},{"style":79},[3779],{"type":27,"value":1294},{"type":21,"tag":62,"props":3781,"children":3782},{"style":91},[3783],{"type":27,"value":3784},"10",{"type":21,"tag":62,"props":3786,"children":3787},{"style":85},[3788],{"type":27,"value":3789}," *",{"type":21,"tag":62,"props":3791,"children":3792},{"style":91},[3793],{"type":27,"value":444},{"type":21,"tag":62,"props":3795,"children":3796},{"style":79},[3797],{"type":27,"value":3798},") ",{"type":21,"tag":62,"props":3800,"children":3801},{"style":85},[3802],{"type":27,"value":826},{"type":21,"tag":62,"props":3804,"children":3805},{"style":79},[3806],{"type":27,"value":1294},{"type":21,"tag":62,"props":3808,"children":3809},{"style":91},[3810],{"type":27,"value":317},{"type":21,"tag":62,"props":3812,"children":3813},{"style":85},[3814],{"type":27,"value":3815}," \u002F",{"type":21,"tag":62,"props":3817,"children":3818},{"style":91},[3819],{"type":27,"value":444},{"type":21,"tag":62,"props":3821,"children":3822},{"style":79},[3823],{"type":27,"value":2738},{"type":21,"tag":62,"props":3825,"children":3826},{"style":69},[3827],{"type":27,"value":3828},"\u002F\u002F Evaluates to 25\n",{"type":21,"tag":22,"props":3830,"children":3831},{"id":3687},[3832],{"type":27,"value":3833},"Statements",{"type":21,"tag":30,"props":3835,"children":3836},{},[3837,3839,3845],{"type":27,"value":3838},"A statement is a complete instruction that performs an action. In PHP, statements are typically terminated with a semicolon (",{"type":21,"tag":36,"props":3840,"children":3842},{"className":3841},[],[3843],{"type":27,"value":3844},";",{"type":27,"value":3846},"). Statements can include expressions, control structures, function calls, and more.",{"type":21,"tag":53,"props":3848,"children":3850},{"className":55,"code":3849,"language":12,"meta":8,"style":8},"\u002F\u002F Variable assignment statement\n$name = \"John\";\n\n\u002F\u002F If statement\nif ($name === \"John\") {\n    echo \"Hello, John!\";\n}\n\n\u002F\u002F For loop statement\nfor ($i = 0; $i \u003C 5; $i++) {\n    echo $i;\n}\n",[3851],{"type":21,"tag":36,"props":3852,"children":3853},{"__ignoreMap":8},[3854,3862,3881,3888,3896,3923,3940,3947,3954,3962,4011,4023],{"type":21,"tag":62,"props":3855,"children":3856},{"class":64,"line":65},[3857],{"type":21,"tag":62,"props":3858,"children":3859},{"style":69},[3860],{"type":27,"value":3861},"\u002F\u002F Variable assignment statement\n",{"type":21,"tag":62,"props":3863,"children":3864},{"class":64,"line":75},[3865,3869,3873,3877],{"type":21,"tag":62,"props":3866,"children":3867},{"style":79},[3868],{"type":27,"value":2405},{"type":21,"tag":62,"props":3870,"children":3871},{"style":85},[3872],{"type":27,"value":88},{"type":21,"tag":62,"props":3874,"children":3875},{"style":102},[3876],{"type":27,"value":189},{"type":21,"tag":62,"props":3878,"children":3879},{"style":79},[3880],{"type":27,"value":1455},{"type":21,"tag":62,"props":3882,"children":3883},{"class":64,"line":132},[3884],{"type":21,"tag":62,"props":3885,"children":3886},{"emptyLinePlaceholder":136},[3887],{"type":27,"value":139},{"type":21,"tag":62,"props":3889,"children":3890},{"class":64,"line":142},[3891],{"type":21,"tag":62,"props":3892,"children":3893},{"style":69},[3894],{"type":27,"value":3895},"\u002F\u002F If statement\n",{"type":21,"tag":62,"props":3897,"children":3898},{"class":64,"line":151},[3899,3904,3909,3914,3918],{"type":21,"tag":62,"props":3900,"children":3901},{"style":85},[3902],{"type":27,"value":3903},"if",{"type":21,"tag":62,"props":3905,"children":3906},{"style":79},[3907],{"type":27,"value":3908}," ($name ",{"type":21,"tag":62,"props":3910,"children":3911},{"style":85},[3912],{"type":27,"value":3913},"===",{"type":21,"tag":62,"props":3915,"children":3916},{"style":102},[3917],{"type":27,"value":189},{"type":21,"tag":62,"props":3919,"children":3920},{"style":79},[3921],{"type":27,"value":3922},") {\n",{"type":21,"tag":62,"props":3924,"children":3925},{"class":64,"line":173},[3926,3931,3936],{"type":21,"tag":62,"props":3927,"children":3928},{"style":91},[3929],{"type":27,"value":3930},"    echo",{"type":21,"tag":62,"props":3932,"children":3933},{"style":102},[3934],{"type":27,"value":3935}," \"Hello, John!\"",{"type":21,"tag":62,"props":3937,"children":3938},{"style":79},[3939],{"type":27,"value":1455},{"type":21,"tag":62,"props":3941,"children":3942},{"class":64,"line":197},[3943],{"type":21,"tag":62,"props":3944,"children":3945},{"style":79},[3946],{"type":27,"value":960},{"type":21,"tag":62,"props":3948,"children":3949},{"class":64,"line":219},[3950],{"type":21,"tag":62,"props":3951,"children":3952},{"emptyLinePlaceholder":136},[3953],{"type":27,"value":139},{"type":21,"tag":62,"props":3955,"children":3956},{"class":64,"line":16},[3957],{"type":21,"tag":62,"props":3958,"children":3959},{"style":69},[3960],{"type":27,"value":3961},"\u002F\u002F For loop statement\n",{"type":21,"tag":62,"props":3963,"children":3964},{"class":64,"line":244},[3965,3970,3975,3979,3983,3988,3993,3997,4002,4007],{"type":21,"tag":62,"props":3966,"children":3967},{"style":85},[3968],{"type":27,"value":3969},"for",{"type":21,"tag":62,"props":3971,"children":3972},{"style":79},[3973],{"type":27,"value":3974}," ($i ",{"type":21,"tag":62,"props":3976,"children":3977},{"style":85},[3978],{"type":27,"value":88},{"type":21,"tag":62,"props":3980,"children":3981},{"style":91},[3982],{"type":27,"value":595},{"type":21,"tag":62,"props":3984,"children":3985},{"style":79},[3986],{"type":27,"value":3987},"; $i ",{"type":21,"tag":62,"props":3989,"children":3990},{"style":85},[3991],{"type":27,"value":3992},"\u003C",{"type":21,"tag":62,"props":3994,"children":3995},{"style":91},[3996],{"type":27,"value":1566},{"type":21,"tag":62,"props":3998,"children":3999},{"style":79},[4000],{"type":27,"value":4001},"; $i",{"type":21,"tag":62,"props":4003,"children":4004},{"style":85},[4005],{"type":27,"value":4006},"++",{"type":21,"tag":62,"props":4008,"children":4009},{"style":79},[4010],{"type":27,"value":3922},{"type":21,"tag":62,"props":4012,"children":4013},{"class":64,"line":252},[4014,4018],{"type":21,"tag":62,"props":4015,"children":4016},{"style":91},[4017],{"type":27,"value":3930},{"type":21,"tag":62,"props":4019,"children":4020},{"style":79},[4021],{"type":27,"value":4022}," $i;\n",{"type":21,"tag":62,"props":4024,"children":4025},{"class":64,"line":261},[4026],{"type":21,"tag":62,"props":4027,"children":4028},{"style":79},[4029],{"type":27,"value":960},{"type":21,"tag":22,"props":4031,"children":4032},{"id":3688},[4033],{"type":27,"value":4034},"Blocks",{"type":21,"tag":30,"props":4036,"children":4037},{},[4038,4040,4046],{"type":27,"value":4039},"A block is a group of statements that are enclosed within curly braces (",{"type":21,"tag":36,"props":4041,"children":4043},{"className":4042},[],[4044],{"type":27,"value":4045},"{}",{"type":27,"value":4047},"). Blocks are used to define the scope of control structures such as loops and conditionals.",{"type":21,"tag":53,"props":4049,"children":4051},{"className":55,"code":4050,"language":12,"meta":8,"style":8},"\u002F\u002F If statement with a block\nif ($name === \"John\") {\n    echo \"Hello, John!\";\n    echo \"Welcome to PHP programming.\";\n}\n\n\u002F\u002F For loop with a block\nfor ($i = 0; $i \u003C 5; $i++) {\n    echo \"The value of i is: \" . $i;\n}\n",[4052],{"type":21,"tag":36,"props":4053,"children":4054},{"__ignoreMap":8},[4055,4063,4086,4101,4117,4124,4131,4139,4182,4202],{"type":21,"tag":62,"props":4056,"children":4057},{"class":64,"line":65},[4058],{"type":21,"tag":62,"props":4059,"children":4060},{"style":69},[4061],{"type":27,"value":4062},"\u002F\u002F If statement with a block\n",{"type":21,"tag":62,"props":4064,"children":4065},{"class":64,"line":75},[4066,4070,4074,4078,4082],{"type":21,"tag":62,"props":4067,"children":4068},{"style":85},[4069],{"type":27,"value":3903},{"type":21,"tag":62,"props":4071,"children":4072},{"style":79},[4073],{"type":27,"value":3908},{"type":21,"tag":62,"props":4075,"children":4076},{"style":85},[4077],{"type":27,"value":3913},{"type":21,"tag":62,"props":4079,"children":4080},{"style":102},[4081],{"type":27,"value":189},{"type":21,"tag":62,"props":4083,"children":4084},{"style":79},[4085],{"type":27,"value":3922},{"type":21,"tag":62,"props":4087,"children":4088},{"class":64,"line":132},[4089,4093,4097],{"type":21,"tag":62,"props":4090,"children":4091},{"style":91},[4092],{"type":27,"value":3930},{"type":21,"tag":62,"props":4094,"children":4095},{"style":102},[4096],{"type":27,"value":3935},{"type":21,"tag":62,"props":4098,"children":4099},{"style":79},[4100],{"type":27,"value":1455},{"type":21,"tag":62,"props":4102,"children":4103},{"class":64,"line":142},[4104,4108,4113],{"type":21,"tag":62,"props":4105,"children":4106},{"style":91},[4107],{"type":27,"value":3930},{"type":21,"tag":62,"props":4109,"children":4110},{"style":102},[4111],{"type":27,"value":4112}," \"Welcome to PHP programming.\"",{"type":21,"tag":62,"props":4114,"children":4115},{"style":79},[4116],{"type":27,"value":1455},{"type":21,"tag":62,"props":4118,"children":4119},{"class":64,"line":151},[4120],{"type":21,"tag":62,"props":4121,"children":4122},{"style":79},[4123],{"type":27,"value":960},{"type":21,"tag":62,"props":4125,"children":4126},{"class":64,"line":173},[4127],{"type":21,"tag":62,"props":4128,"children":4129},{"emptyLinePlaceholder":136},[4130],{"type":27,"value":139},{"type":21,"tag":62,"props":4132,"children":4133},{"class":64,"line":197},[4134],{"type":21,"tag":62,"props":4135,"children":4136},{"style":69},[4137],{"type":27,"value":4138},"\u002F\u002F For loop with a block\n",{"type":21,"tag":62,"props":4140,"children":4141},{"class":64,"line":219},[4142,4146,4150,4154,4158,4162,4166,4170,4174,4178],{"type":21,"tag":62,"props":4143,"children":4144},{"style":85},[4145],{"type":27,"value":3969},{"type":21,"tag":62,"props":4147,"children":4148},{"style":79},[4149],{"type":27,"value":3974},{"type":21,"tag":62,"props":4151,"children":4152},{"style":85},[4153],{"type":27,"value":88},{"type":21,"tag":62,"props":4155,"children":4156},{"style":91},[4157],{"type":27,"value":595},{"type":21,"tag":62,"props":4159,"children":4160},{"style":79},[4161],{"type":27,"value":3987},{"type":21,"tag":62,"props":4163,"children":4164},{"style":85},[4165],{"type":27,"value":3992},{"type":21,"tag":62,"props":4167,"children":4168},{"style":91},[4169],{"type":27,"value":1566},{"type":21,"tag":62,"props":4171,"children":4172},{"style":79},[4173],{"type":27,"value":4001},{"type":21,"tag":62,"props":4175,"children":4176},{"style":85},[4177],{"type":27,"value":4006},{"type":21,"tag":62,"props":4179,"children":4180},{"style":79},[4181],{"type":27,"value":3922},{"type":21,"tag":62,"props":4183,"children":4184},{"class":64,"line":16},[4185,4189,4194,4198],{"type":21,"tag":62,"props":4186,"children":4187},{"style":91},[4188],{"type":27,"value":3930},{"type":21,"tag":62,"props":4190,"children":4191},{"style":102},[4192],{"type":27,"value":4193}," \"The value of i is: \"",{"type":21,"tag":62,"props":4195,"children":4196},{"style":85},[4197],{"type":27,"value":1893},{"type":21,"tag":62,"props":4199,"children":4200},{"style":79},[4201],{"type":27,"value":4022},{"type":21,"tag":62,"props":4203,"children":4204},{"class":64,"line":244},[4205],{"type":21,"tag":62,"props":4206,"children":4207},{"style":79},[4208],{"type":27,"value":960},{"type":21,"tag":1221,"props":4210,"children":4211},{},[4212],{"type":27,"value":1225},{"title":8,"searchDepth":132,"depth":132,"links":4214},[4215,4216,4217],{"id":3686,"depth":75,"text":3695},{"id":3687,"depth":75,"text":3833},{"id":3688,"depth":75,"text":4034},"content:php:php-fundamental:expression-statement-block.md","php\u002Fphp-fundamental\u002Fexpression-statement-block.md","php\u002Fphp-fundamental\u002Fexpression-statement-block",{"_path":4222,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":4223,"description":4224,"tags":4225,"date":15,"weight":244,"body":4227,"_type":1234,"_id":5564,"_source":1236,"_file":5565,"_stem":5566,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Fflow-control","PHP Flow Control","Essential PHP flow control structures and patterns",[12,13,4226],"flow control",{"type":18,"children":4228,"toc":5556},[4229,4235,4240,4337,4343,4348,4519,4525,4536,4700,4706,4711,5087,5093,5098,5552],{"type":21,"tag":22,"props":4230,"children":4232},{"id":4231},"flow-control",[4233],{"type":27,"value":4234},"Flow Control",{"type":21,"tag":30,"props":4236,"children":4237},{},[4238],{"type":27,"value":4239},"In PHP, flow control structures allow you to control the execution of your code based on certain conditions or to repeat a block of code multiple times. The main flow control structures in PHP include:",{"type":21,"tag":1318,"props":4241,"children":4242},{},[4243,4274,4305],{"type":21,"tag":1322,"props":4244,"children":4245},{},[4246,4248,4253,4254,4260,4261,4267,4268],{"type":27,"value":4247},"Conditional statements: ",{"type":21,"tag":36,"props":4249,"children":4251},{"className":4250},[],[4252],{"type":27,"value":3903},{"type":27,"value":110},{"type":21,"tag":36,"props":4255,"children":4257},{"className":4256},[],[4258],{"type":27,"value":4259},"else",{"type":27,"value":110},{"type":21,"tag":36,"props":4262,"children":4264},{"className":4263},[],[4265],{"type":27,"value":4266},"elseif",{"type":27,"value":110},{"type":21,"tag":36,"props":4269,"children":4271},{"className":4270},[],[4272],{"type":27,"value":4273},"switch",{"type":21,"tag":1322,"props":4275,"children":4276},{},[4277,4279,4284,4285,4291,4292,4298,4299],{"type":27,"value":4278},"Loops: ",{"type":21,"tag":36,"props":4280,"children":4282},{"className":4281},[],[4283],{"type":27,"value":3969},{"type":27,"value":110},{"type":21,"tag":36,"props":4286,"children":4288},{"className":4287},[],[4289],{"type":27,"value":4290},"foreach",{"type":27,"value":110},{"type":21,"tag":36,"props":4293,"children":4295},{"className":4294},[],[4296],{"type":27,"value":4297},"while",{"type":27,"value":110},{"type":21,"tag":36,"props":4300,"children":4302},{"className":4301},[],[4303],{"type":27,"value":4304},"do-while",{"type":21,"tag":1322,"props":4306,"children":4307},{},[4308,4310,4316,4317,4323,4324,4330,4331],{"type":27,"value":4309},"Jump statements: ",{"type":21,"tag":36,"props":4311,"children":4313},{"className":4312},[],[4314],{"type":27,"value":4315},"break",{"type":27,"value":110},{"type":21,"tag":36,"props":4318,"children":4320},{"className":4319},[],[4321],{"type":27,"value":4322},"continue",{"type":27,"value":110},{"type":21,"tag":36,"props":4325,"children":4327},{"className":4326},[],[4328],{"type":27,"value":4329},"return",{"type":27,"value":110},{"type":21,"tag":36,"props":4332,"children":4334},{"className":4333},[],[4335],{"type":27,"value":4336},"goto",{"type":21,"tag":1260,"props":4338,"children":4340},{"id":4339},"conditional-statements",[4341],{"type":27,"value":4342},"Conditional Statements",{"type":21,"tag":30,"props":4344,"children":4345},{},[4346],{"type":27,"value":4347},"Conditional statements allow you to execute different blocks of code based on certain conditions.",{"type":21,"tag":53,"props":4349,"children":4351},{"className":55,"code":4350,"language":12,"meta":8,"style":8},"$age = 20;\nif ($age \u003C 18) {\n    echo \"You are a minor.\";\n} elseif ($age >= 18 && $age \u003C 65) {\n    echo \"You are an adult.\";\n} else {\n    echo \"You are a senior.\";\n}\n",[4352],{"type":21,"tag":36,"props":4353,"children":4354},{"__ignoreMap":8},[4355,4376,4401,4417,4465,4481,4496,4512],{"type":21,"tag":62,"props":4356,"children":4357},{"class":64,"line":65},[4358,4363,4367,4372],{"type":21,"tag":62,"props":4359,"children":4360},{"style":79},[4361],{"type":27,"value":4362},"$age ",{"type":21,"tag":62,"props":4364,"children":4365},{"style":85},[4366],{"type":27,"value":88},{"type":21,"tag":62,"props":4368,"children":4369},{"style":91},[4370],{"type":27,"value":4371}," 20",{"type":21,"tag":62,"props":4373,"children":4374},{"style":79},[4375],{"type":27,"value":1455},{"type":21,"tag":62,"props":4377,"children":4378},{"class":64,"line":75},[4379,4383,4388,4392,4397],{"type":21,"tag":62,"props":4380,"children":4381},{"style":85},[4382],{"type":27,"value":3903},{"type":21,"tag":62,"props":4384,"children":4385},{"style":79},[4386],{"type":27,"value":4387}," ($age ",{"type":21,"tag":62,"props":4389,"children":4390},{"style":85},[4391],{"type":27,"value":3992},{"type":21,"tag":62,"props":4393,"children":4394},{"style":91},[4395],{"type":27,"value":4396}," 18",{"type":21,"tag":62,"props":4398,"children":4399},{"style":79},[4400],{"type":27,"value":3922},{"type":21,"tag":62,"props":4402,"children":4403},{"class":64,"line":132},[4404,4408,4413],{"type":21,"tag":62,"props":4405,"children":4406},{"style":91},[4407],{"type":27,"value":3930},{"type":21,"tag":62,"props":4409,"children":4410},{"style":102},[4411],{"type":27,"value":4412}," \"You are a minor.\"",{"type":21,"tag":62,"props":4414,"children":4415},{"style":79},[4416],{"type":27,"value":1455},{"type":21,"tag":62,"props":4418,"children":4419},{"class":64,"line":142},[4420,4425,4429,4433,4438,4442,4447,4452,4456,4461],{"type":21,"tag":62,"props":4421,"children":4422},{"style":79},[4423],{"type":27,"value":4424},"} ",{"type":21,"tag":62,"props":4426,"children":4427},{"style":85},[4428],{"type":27,"value":4266},{"type":21,"tag":62,"props":4430,"children":4431},{"style":79},[4432],{"type":27,"value":4387},{"type":21,"tag":62,"props":4434,"children":4435},{"style":85},[4436],{"type":27,"value":4437},">=",{"type":21,"tag":62,"props":4439,"children":4440},{"style":91},[4441],{"type":27,"value":4396},{"type":21,"tag":62,"props":4443,"children":4444},{"style":85},[4445],{"type":27,"value":4446}," &&",{"type":21,"tag":62,"props":4448,"children":4449},{"style":79},[4450],{"type":27,"value":4451}," $age ",{"type":21,"tag":62,"props":4453,"children":4454},{"style":85},[4455],{"type":27,"value":3992},{"type":21,"tag":62,"props":4457,"children":4458},{"style":91},[4459],{"type":27,"value":4460}," 65",{"type":21,"tag":62,"props":4462,"children":4463},{"style":79},[4464],{"type":27,"value":3922},{"type":21,"tag":62,"props":4466,"children":4467},{"class":64,"line":151},[4468,4472,4477],{"type":21,"tag":62,"props":4469,"children":4470},{"style":91},[4471],{"type":27,"value":3930},{"type":21,"tag":62,"props":4473,"children":4474},{"style":102},[4475],{"type":27,"value":4476}," \"You are an adult.\"",{"type":21,"tag":62,"props":4478,"children":4479},{"style":79},[4480],{"type":27,"value":1455},{"type":21,"tag":62,"props":4482,"children":4483},{"class":64,"line":173},[4484,4488,4492],{"type":21,"tag":62,"props":4485,"children":4486},{"style":79},[4487],{"type":27,"value":4424},{"type":21,"tag":62,"props":4489,"children":4490},{"style":85},[4491],{"type":27,"value":4259},{"type":21,"tag":62,"props":4493,"children":4494},{"style":79},[4495],{"type":27,"value":2283},{"type":21,"tag":62,"props":4497,"children":4498},{"class":64,"line":197},[4499,4503,4508],{"type":21,"tag":62,"props":4500,"children":4501},{"style":91},[4502],{"type":27,"value":3930},{"type":21,"tag":62,"props":4504,"children":4505},{"style":102},[4506],{"type":27,"value":4507}," \"You are a senior.\"",{"type":21,"tag":62,"props":4509,"children":4510},{"style":79},[4511],{"type":27,"value":1455},{"type":21,"tag":62,"props":4513,"children":4514},{"class":64,"line":219},[4515],{"type":21,"tag":62,"props":4516,"children":4517},{"style":79},[4518],{"type":27,"value":960},{"type":21,"tag":1260,"props":4520,"children":4522},{"id":4521},"switch-statement",[4523],{"type":27,"value":4524},"Switch Statement",{"type":21,"tag":30,"props":4526,"children":4527},{},[4528,4529,4534],{"type":27,"value":333},{"type":21,"tag":36,"props":4530,"children":4532},{"className":4531},[],[4533],{"type":27,"value":4273},{"type":27,"value":4535}," statement is used to perform different actions based on different conditions.",{"type":21,"tag":53,"props":4537,"children":4539},{"className":55,"code":4538,"language":12,"meta":8,"style":8},"$day = \"Monday\";\nswitch ($day) {\n    case \"Monday\":\n        echo \"Today is Monday.\";\n        break;\n    case \"Tuesday\":\n        echo \"Today is Tuesday.\";\n        break;\n    default:\n        echo \"Today is not Monday or Tuesday.\";\n}\n",[4540],{"type":21,"tag":36,"props":4541,"children":4542},{"__ignoreMap":8},[4543,4564,4576,4593,4610,4622,4638,4654,4665,4677,4693],{"type":21,"tag":62,"props":4544,"children":4545},{"class":64,"line":65},[4546,4551,4555,4560],{"type":21,"tag":62,"props":4547,"children":4548},{"style":79},[4549],{"type":27,"value":4550},"$day ",{"type":21,"tag":62,"props":4552,"children":4553},{"style":85},[4554],{"type":27,"value":88},{"type":21,"tag":62,"props":4556,"children":4557},{"style":102},[4558],{"type":27,"value":4559}," \"Monday\"",{"type":21,"tag":62,"props":4561,"children":4562},{"style":79},[4563],{"type":27,"value":1455},{"type":21,"tag":62,"props":4565,"children":4566},{"class":64,"line":75},[4567,4571],{"type":21,"tag":62,"props":4568,"children":4569},{"style":85},[4570],{"type":27,"value":4273},{"type":21,"tag":62,"props":4572,"children":4573},{"style":79},[4574],{"type":27,"value":4575}," ($day) {\n",{"type":21,"tag":62,"props":4577,"children":4578},{"class":64,"line":132},[4579,4584,4588],{"type":21,"tag":62,"props":4580,"children":4581},{"style":85},[4582],{"type":27,"value":4583},"    case",{"type":21,"tag":62,"props":4585,"children":4586},{"style":102},[4587],{"type":27,"value":4559},{"type":21,"tag":62,"props":4589,"children":4590},{"style":79},[4591],{"type":27,"value":4592},":\n",{"type":21,"tag":62,"props":4594,"children":4595},{"class":64,"line":142},[4596,4601,4606],{"type":21,"tag":62,"props":4597,"children":4598},{"style":91},[4599],{"type":27,"value":4600},"        echo",{"type":21,"tag":62,"props":4602,"children":4603},{"style":102},[4604],{"type":27,"value":4605}," \"Today is Monday.\"",{"type":21,"tag":62,"props":4607,"children":4608},{"style":79},[4609],{"type":27,"value":1455},{"type":21,"tag":62,"props":4611,"children":4612},{"class":64,"line":151},[4613,4618],{"type":21,"tag":62,"props":4614,"children":4615},{"style":85},[4616],{"type":27,"value":4617},"        break",{"type":21,"tag":62,"props":4619,"children":4620},{"style":79},[4621],{"type":27,"value":1455},{"type":21,"tag":62,"props":4623,"children":4624},{"class":64,"line":173},[4625,4629,4634],{"type":21,"tag":62,"props":4626,"children":4627},{"style":85},[4628],{"type":27,"value":4583},{"type":21,"tag":62,"props":4630,"children":4631},{"style":102},[4632],{"type":27,"value":4633}," \"Tuesday\"",{"type":21,"tag":62,"props":4635,"children":4636},{"style":79},[4637],{"type":27,"value":4592},{"type":21,"tag":62,"props":4639,"children":4640},{"class":64,"line":197},[4641,4645,4650],{"type":21,"tag":62,"props":4642,"children":4643},{"style":91},[4644],{"type":27,"value":4600},{"type":21,"tag":62,"props":4646,"children":4647},{"style":102},[4648],{"type":27,"value":4649}," \"Today is Tuesday.\"",{"type":21,"tag":62,"props":4651,"children":4652},{"style":79},[4653],{"type":27,"value":1455},{"type":21,"tag":62,"props":4655,"children":4656},{"class":64,"line":219},[4657,4661],{"type":21,"tag":62,"props":4658,"children":4659},{"style":85},[4660],{"type":27,"value":4617},{"type":21,"tag":62,"props":4662,"children":4663},{"style":79},[4664],{"type":27,"value":1455},{"type":21,"tag":62,"props":4666,"children":4667},{"class":64,"line":16},[4668,4673],{"type":21,"tag":62,"props":4669,"children":4670},{"style":85},[4671],{"type":27,"value":4672},"    default",{"type":21,"tag":62,"props":4674,"children":4675},{"style":79},[4676],{"type":27,"value":4592},{"type":21,"tag":62,"props":4678,"children":4679},{"class":64,"line":244},[4680,4684,4689],{"type":21,"tag":62,"props":4681,"children":4682},{"style":91},[4683],{"type":27,"value":4600},{"type":21,"tag":62,"props":4685,"children":4686},{"style":102},[4687],{"type":27,"value":4688}," \"Today is not Monday or Tuesday.\"",{"type":21,"tag":62,"props":4690,"children":4691},{"style":79},[4692],{"type":27,"value":1455},{"type":21,"tag":62,"props":4694,"children":4695},{"class":64,"line":252},[4696],{"type":21,"tag":62,"props":4697,"children":4698},{"style":79},[4699],{"type":27,"value":960},{"type":21,"tag":1260,"props":4701,"children":4703},{"id":4702},"loops",[4704],{"type":27,"value":4705},"Loops",{"type":21,"tag":30,"props":4707,"children":4708},{},[4709],{"type":27,"value":4710},"Loops allow you to execute a block of code repeatedly as long as a certain condition is met.",{"type":21,"tag":53,"props":4712,"children":4714},{"className":55,"code":4713,"language":12,"meta":8,"style":8},"\u002F\u002F For loop\nfor ($i = 0; $i \u003C 5; $i++) {\n    echo $i;\n}\n\n\u002F\u002F Foreach loop\n$fruits = [\"Apple\", \"Banana\", \"Cherry\"];\nforeach ($fruits as $fruit) {\n    echo $fruit;\n}\n\n\u002F\u002F While loop\n$count = 0;\nwhile ($count \u003C 5) {\n    echo $count;\n    $count++;\n}\n\n\u002F\u002F Do-while loop\n$count = 0;\ndo {\n    echo $count;\n    $count++;\n} while ($count \u003C 5);\n",[4715],{"type":21,"tag":36,"props":4716,"children":4717},{"__ignoreMap":8},[4718,4726,4769,4780,4787,4794,4802,4841,4863,4875,4882,4889,4897,4918,4943,4956,4973,4981,4989,4998,5018,5031,5043,5059],{"type":21,"tag":62,"props":4719,"children":4720},{"class":64,"line":65},[4721],{"type":21,"tag":62,"props":4722,"children":4723},{"style":69},[4724],{"type":27,"value":4725},"\u002F\u002F For loop\n",{"type":21,"tag":62,"props":4727,"children":4728},{"class":64,"line":75},[4729,4733,4737,4741,4745,4749,4753,4757,4761,4765],{"type":21,"tag":62,"props":4730,"children":4731},{"style":85},[4732],{"type":27,"value":3969},{"type":21,"tag":62,"props":4734,"children":4735},{"style":79},[4736],{"type":27,"value":3974},{"type":21,"tag":62,"props":4738,"children":4739},{"style":85},[4740],{"type":27,"value":88},{"type":21,"tag":62,"props":4742,"children":4743},{"style":91},[4744],{"type":27,"value":595},{"type":21,"tag":62,"props":4746,"children":4747},{"style":79},[4748],{"type":27,"value":3987},{"type":21,"tag":62,"props":4750,"children":4751},{"style":85},[4752],{"type":27,"value":3992},{"type":21,"tag":62,"props":4754,"children":4755},{"style":91},[4756],{"type":27,"value":1566},{"type":21,"tag":62,"props":4758,"children":4759},{"style":79},[4760],{"type":27,"value":4001},{"type":21,"tag":62,"props":4762,"children":4763},{"style":85},[4764],{"type":27,"value":4006},{"type":21,"tag":62,"props":4766,"children":4767},{"style":79},[4768],{"type":27,"value":3922},{"type":21,"tag":62,"props":4770,"children":4771},{"class":64,"line":132},[4772,4776],{"type":21,"tag":62,"props":4773,"children":4774},{"style":91},[4775],{"type":27,"value":3930},{"type":21,"tag":62,"props":4777,"children":4778},{"style":79},[4779],{"type":27,"value":4022},{"type":21,"tag":62,"props":4781,"children":4782},{"class":64,"line":142},[4783],{"type":21,"tag":62,"props":4784,"children":4785},{"style":79},[4786],{"type":27,"value":960},{"type":21,"tag":62,"props":4788,"children":4789},{"class":64,"line":151},[4790],{"type":21,"tag":62,"props":4791,"children":4792},{"emptyLinePlaceholder":136},[4793],{"type":27,"value":139},{"type":21,"tag":62,"props":4795,"children":4796},{"class":64,"line":173},[4797],{"type":21,"tag":62,"props":4798,"children":4799},{"style":69},[4800],{"type":27,"value":4801},"\u002F\u002F Foreach loop\n",{"type":21,"tag":62,"props":4803,"children":4804},{"class":64,"line":197},[4805,4809,4813,4817,4821,4825,4829,4833,4837],{"type":21,"tag":62,"props":4806,"children":4807},{"style":79},[4808],{"type":27,"value":82},{"type":21,"tag":62,"props":4810,"children":4811},{"style":85},[4812],{"type":27,"value":88},{"type":21,"tag":62,"props":4814,"children":4815},{"style":79},[4816],{"type":27,"value":276},{"type":21,"tag":62,"props":4818,"children":4819},{"style":102},[4820],{"type":27,"value":105},{"type":21,"tag":62,"props":4822,"children":4823},{"style":79},[4824],{"type":27,"value":110},{"type":21,"tag":62,"props":4826,"children":4827},{"style":102},[4828],{"type":27,"value":115},{"type":21,"tag":62,"props":4830,"children":4831},{"style":79},[4832],{"type":27,"value":110},{"type":21,"tag":62,"props":4834,"children":4835},{"style":102},[4836],{"type":27,"value":124},{"type":21,"tag":62,"props":4838,"children":4839},{"style":79},[4840],{"type":27,"value":322},{"type":21,"tag":62,"props":4842,"children":4843},{"class":64,"line":219},[4844,4848,4853,4858],{"type":21,"tag":62,"props":4845,"children":4846},{"style":85},[4847],{"type":27,"value":4290},{"type":21,"tag":62,"props":4849,"children":4850},{"style":79},[4851],{"type":27,"value":4852}," ($fruits ",{"type":21,"tag":62,"props":4854,"children":4855},{"style":85},[4856],{"type":27,"value":4857},"as",{"type":21,"tag":62,"props":4859,"children":4860},{"style":79},[4861],{"type":27,"value":4862}," $fruit) {\n",{"type":21,"tag":62,"props":4864,"children":4865},{"class":64,"line":16},[4866,4870],{"type":21,"tag":62,"props":4867,"children":4868},{"style":91},[4869],{"type":27,"value":3930},{"type":21,"tag":62,"props":4871,"children":4872},{"style":79},[4873],{"type":27,"value":4874}," $fruit;\n",{"type":21,"tag":62,"props":4876,"children":4877},{"class":64,"line":244},[4878],{"type":21,"tag":62,"props":4879,"children":4880},{"style":79},[4881],{"type":27,"value":960},{"type":21,"tag":62,"props":4883,"children":4884},{"class":64,"line":252},[4885],{"type":21,"tag":62,"props":4886,"children":4887},{"emptyLinePlaceholder":136},[4888],{"type":27,"value":139},{"type":21,"tag":62,"props":4890,"children":4891},{"class":64,"line":261},[4892],{"type":21,"tag":62,"props":4893,"children":4894},{"style":69},[4895],{"type":27,"value":4896},"\u002F\u002F While loop\n",{"type":21,"tag":62,"props":4898,"children":4900},{"class":64,"line":4899},13,[4901,4906,4910,4914],{"type":21,"tag":62,"props":4902,"children":4903},{"style":79},[4904],{"type":27,"value":4905},"$count ",{"type":21,"tag":62,"props":4907,"children":4908},{"style":85},[4909],{"type":27,"value":88},{"type":21,"tag":62,"props":4911,"children":4912},{"style":91},[4913],{"type":27,"value":595},{"type":21,"tag":62,"props":4915,"children":4916},{"style":79},[4917],{"type":27,"value":1455},{"type":21,"tag":62,"props":4919,"children":4921},{"class":64,"line":4920},14,[4922,4926,4931,4935,4939],{"type":21,"tag":62,"props":4923,"children":4924},{"style":85},[4925],{"type":27,"value":4297},{"type":21,"tag":62,"props":4927,"children":4928},{"style":79},[4929],{"type":27,"value":4930}," ($count ",{"type":21,"tag":62,"props":4932,"children":4933},{"style":85},[4934],{"type":27,"value":3992},{"type":21,"tag":62,"props":4936,"children":4937},{"style":91},[4938],{"type":27,"value":1566},{"type":21,"tag":62,"props":4940,"children":4941},{"style":79},[4942],{"type":27,"value":3922},{"type":21,"tag":62,"props":4944,"children":4946},{"class":64,"line":4945},15,[4947,4951],{"type":21,"tag":62,"props":4948,"children":4949},{"style":91},[4950],{"type":27,"value":3930},{"type":21,"tag":62,"props":4952,"children":4953},{"style":79},[4954],{"type":27,"value":4955}," $count;\n",{"type":21,"tag":62,"props":4957,"children":4959},{"class":64,"line":4958},16,[4960,4965,4969],{"type":21,"tag":62,"props":4961,"children":4962},{"style":79},[4963],{"type":27,"value":4964},"    $count",{"type":21,"tag":62,"props":4966,"children":4967},{"style":85},[4968],{"type":27,"value":4006},{"type":21,"tag":62,"props":4970,"children":4971},{"style":79},[4972],{"type":27,"value":1455},{"type":21,"tag":62,"props":4974,"children":4976},{"class":64,"line":4975},17,[4977],{"type":21,"tag":62,"props":4978,"children":4979},{"style":79},[4980],{"type":27,"value":960},{"type":21,"tag":62,"props":4982,"children":4984},{"class":64,"line":4983},18,[4985],{"type":21,"tag":62,"props":4986,"children":4987},{"emptyLinePlaceholder":136},[4988],{"type":27,"value":139},{"type":21,"tag":62,"props":4990,"children":4992},{"class":64,"line":4991},19,[4993],{"type":21,"tag":62,"props":4994,"children":4995},{"style":69},[4996],{"type":27,"value":4997},"\u002F\u002F Do-while loop\n",{"type":21,"tag":62,"props":4999,"children":5001},{"class":64,"line":5000},20,[5002,5006,5010,5014],{"type":21,"tag":62,"props":5003,"children":5004},{"style":79},[5005],{"type":27,"value":4905},{"type":21,"tag":62,"props":5007,"children":5008},{"style":85},[5009],{"type":27,"value":88},{"type":21,"tag":62,"props":5011,"children":5012},{"style":91},[5013],{"type":27,"value":595},{"type":21,"tag":62,"props":5015,"children":5016},{"style":79},[5017],{"type":27,"value":1455},{"type":21,"tag":62,"props":5019,"children":5021},{"class":64,"line":5020},21,[5022,5027],{"type":21,"tag":62,"props":5023,"children":5024},{"style":85},[5025],{"type":27,"value":5026},"do",{"type":21,"tag":62,"props":5028,"children":5029},{"style":79},[5030],{"type":27,"value":2283},{"type":21,"tag":62,"props":5032,"children":5034},{"class":64,"line":5033},22,[5035,5039],{"type":21,"tag":62,"props":5036,"children":5037},{"style":91},[5038],{"type":27,"value":3930},{"type":21,"tag":62,"props":5040,"children":5041},{"style":79},[5042],{"type":27,"value":4955},{"type":21,"tag":62,"props":5044,"children":5046},{"class":64,"line":5045},23,[5047,5051,5055],{"type":21,"tag":62,"props":5048,"children":5049},{"style":79},[5050],{"type":27,"value":4964},{"type":21,"tag":62,"props":5052,"children":5053},{"style":85},[5054],{"type":27,"value":4006},{"type":21,"tag":62,"props":5056,"children":5057},{"style":79},[5058],{"type":27,"value":1455},{"type":21,"tag":62,"props":5060,"children":5062},{"class":64,"line":5061},24,[5063,5067,5071,5075,5079,5083],{"type":21,"tag":62,"props":5064,"children":5065},{"style":79},[5066],{"type":27,"value":4424},{"type":21,"tag":62,"props":5068,"children":5069},{"style":85},[5070],{"type":27,"value":4297},{"type":21,"tag":62,"props":5072,"children":5073},{"style":79},[5074],{"type":27,"value":4930},{"type":21,"tag":62,"props":5076,"children":5077},{"style":85},[5078],{"type":27,"value":3992},{"type":21,"tag":62,"props":5080,"children":5081},{"style":91},[5082],{"type":27,"value":1566},{"type":21,"tag":62,"props":5084,"children":5085},{"style":79},[5086],{"type":27,"value":129},{"type":21,"tag":1260,"props":5088,"children":5090},{"id":5089},"jump-statements",[5091],{"type":27,"value":5092},"Jump Statements",{"type":21,"tag":30,"props":5094,"children":5095},{},[5096],{"type":27,"value":5097},"Jump statements allow you to alter the flow of execution in your code.",{"type":21,"tag":53,"props":5099,"children":5101},{"className":55,"code":5100,"language":12,"meta":8,"style":8},"\u002F\u002F Break statement\nfor ($i = 0; $i \u003C 10; $i++) {\n    if ($i == 5) {\n        break; \u002F\u002F Exit the loop when $i is 5\n    }\n    echo $i;\n}\n\n\u002F\u002F Continue statement\nfor ($i = 0; $i \u003C 10; $i++) {\n    if ($i % 2 == 0) {\n        continue; \u002F\u002F Skip even numbers\n    }\n    echo $i;\n}\n\n\u002F\u002F Return statement\nfunction add($a, $b) {\n    return $a + $b; \u002F\u002F Return the sum of $a and $b\n}\necho add(5, 3); \u002F\u002F Outputs: 8\n\n\u002F\u002F Goto statement\ngoto label;\necho \"This will be skipped.\";\nlabel:\necho \"This will be executed.\";\n\u002F\u002F Outputs: \"This will be executed.\"\n\u002F\u002F Note: The use of `goto` is generally discouraged as it can make code harder to read and maintain.\n",[5102],{"type":21,"tag":36,"props":5103,"children":5104},{"__ignoreMap":8},[5105,5113,5157,5182,5198,5205,5216,5223,5230,5238,5281,5313,5330,5337,5348,5355,5362,5370,5387,5413,5420,5456,5463,5471,5487,5504,5517,5534,5543],{"type":21,"tag":62,"props":5106,"children":5107},{"class":64,"line":65},[5108],{"type":21,"tag":62,"props":5109,"children":5110},{"style":69},[5111],{"type":27,"value":5112},"\u002F\u002F Break statement\n",{"type":21,"tag":62,"props":5114,"children":5115},{"class":64,"line":75},[5116,5120,5124,5128,5132,5136,5140,5145,5149,5153],{"type":21,"tag":62,"props":5117,"children":5118},{"style":85},[5119],{"type":27,"value":3969},{"type":21,"tag":62,"props":5121,"children":5122},{"style":79},[5123],{"type":27,"value":3974},{"type":21,"tag":62,"props":5125,"children":5126},{"style":85},[5127],{"type":27,"value":88},{"type":21,"tag":62,"props":5129,"children":5130},{"style":91},[5131],{"type":27,"value":595},{"type":21,"tag":62,"props":5133,"children":5134},{"style":79},[5135],{"type":27,"value":3987},{"type":21,"tag":62,"props":5137,"children":5138},{"style":85},[5139],{"type":27,"value":3992},{"type":21,"tag":62,"props":5141,"children":5142},{"style":91},[5143],{"type":27,"value":5144}," 10",{"type":21,"tag":62,"props":5146,"children":5147},{"style":79},[5148],{"type":27,"value":4001},{"type":21,"tag":62,"props":5150,"children":5151},{"style":85},[5152],{"type":27,"value":4006},{"type":21,"tag":62,"props":5154,"children":5155},{"style":79},[5156],{"type":27,"value":3922},{"type":21,"tag":62,"props":5158,"children":5159},{"class":64,"line":132},[5160,5165,5169,5174,5178],{"type":21,"tag":62,"props":5161,"children":5162},{"style":85},[5163],{"type":27,"value":5164},"    if",{"type":21,"tag":62,"props":5166,"children":5167},{"style":79},[5168],{"type":27,"value":3974},{"type":21,"tag":62,"props":5170,"children":5171},{"style":85},[5172],{"type":27,"value":5173},"==",{"type":21,"tag":62,"props":5175,"children":5176},{"style":91},[5177],{"type":27,"value":1566},{"type":21,"tag":62,"props":5179,"children":5180},{"style":79},[5181],{"type":27,"value":3922},{"type":21,"tag":62,"props":5183,"children":5184},{"class":64,"line":142},[5185,5189,5193],{"type":21,"tag":62,"props":5186,"children":5187},{"style":85},[5188],{"type":27,"value":4617},{"type":21,"tag":62,"props":5190,"children":5191},{"style":79},[5192],{"type":27,"value":1571},{"type":21,"tag":62,"props":5194,"children":5195},{"style":69},[5196],{"type":27,"value":5197},"\u002F\u002F Exit the loop when $i is 5\n",{"type":21,"tag":62,"props":5199,"children":5200},{"class":64,"line":151},[5201],{"type":21,"tag":62,"props":5202,"children":5203},{"style":79},[5204],{"type":27,"value":3478},{"type":21,"tag":62,"props":5206,"children":5207},{"class":64,"line":173},[5208,5212],{"type":21,"tag":62,"props":5209,"children":5210},{"style":91},[5211],{"type":27,"value":3930},{"type":21,"tag":62,"props":5213,"children":5214},{"style":79},[5215],{"type":27,"value":4022},{"type":21,"tag":62,"props":5217,"children":5218},{"class":64,"line":197},[5219],{"type":21,"tag":62,"props":5220,"children":5221},{"style":79},[5222],{"type":27,"value":960},{"type":21,"tag":62,"props":5224,"children":5225},{"class":64,"line":219},[5226],{"type":21,"tag":62,"props":5227,"children":5228},{"emptyLinePlaceholder":136},[5229],{"type":27,"value":139},{"type":21,"tag":62,"props":5231,"children":5232},{"class":64,"line":16},[5233],{"type":21,"tag":62,"props":5234,"children":5235},{"style":69},[5236],{"type":27,"value":5237},"\u002F\u002F Continue statement\n",{"type":21,"tag":62,"props":5239,"children":5240},{"class":64,"line":244},[5241,5245,5249,5253,5257,5261,5265,5269,5273,5277],{"type":21,"tag":62,"props":5242,"children":5243},{"style":85},[5244],{"type":27,"value":3969},{"type":21,"tag":62,"props":5246,"children":5247},{"style":79},[5248],{"type":27,"value":3974},{"type":21,"tag":62,"props":5250,"children":5251},{"style":85},[5252],{"type":27,"value":88},{"type":21,"tag":62,"props":5254,"children":5255},{"style":91},[5256],{"type":27,"value":595},{"type":21,"tag":62,"props":5258,"children":5259},{"style":79},[5260],{"type":27,"value":3987},{"type":21,"tag":62,"props":5262,"children":5263},{"style":85},[5264],{"type":27,"value":3992},{"type":21,"tag":62,"props":5266,"children":5267},{"style":91},[5268],{"type":27,"value":5144},{"type":21,"tag":62,"props":5270,"children":5271},{"style":79},[5272],{"type":27,"value":4001},{"type":21,"tag":62,"props":5274,"children":5275},{"style":85},[5276],{"type":27,"value":4006},{"type":21,"tag":62,"props":5278,"children":5279},{"style":79},[5280],{"type":27,"value":3922},{"type":21,"tag":62,"props":5282,"children":5283},{"class":64,"line":252},[5284,5288,5292,5296,5300,5305,5309],{"type":21,"tag":62,"props":5285,"children":5286},{"style":85},[5287],{"type":27,"value":5164},{"type":21,"tag":62,"props":5289,"children":5290},{"style":79},[5291],{"type":27,"value":3974},{"type":21,"tag":62,"props":5293,"children":5294},{"style":85},[5295],{"type":27,"value":581},{"type":21,"tag":62,"props":5297,"children":5298},{"style":91},[5299],{"type":27,"value":444},{"type":21,"tag":62,"props":5301,"children":5302},{"style":85},[5303],{"type":27,"value":5304}," ==",{"type":21,"tag":62,"props":5306,"children":5307},{"style":91},[5308],{"type":27,"value":595},{"type":21,"tag":62,"props":5310,"children":5311},{"style":79},[5312],{"type":27,"value":3922},{"type":21,"tag":62,"props":5314,"children":5315},{"class":64,"line":261},[5316,5321,5325],{"type":21,"tag":62,"props":5317,"children":5318},{"style":85},[5319],{"type":27,"value":5320},"        continue",{"type":21,"tag":62,"props":5322,"children":5323},{"style":79},[5324],{"type":27,"value":1571},{"type":21,"tag":62,"props":5326,"children":5327},{"style":69},[5328],{"type":27,"value":5329},"\u002F\u002F Skip even numbers\n",{"type":21,"tag":62,"props":5331,"children":5332},{"class":64,"line":4899},[5333],{"type":21,"tag":62,"props":5334,"children":5335},{"style":79},[5336],{"type":27,"value":3478},{"type":21,"tag":62,"props":5338,"children":5339},{"class":64,"line":4920},[5340,5344],{"type":21,"tag":62,"props":5341,"children":5342},{"style":91},[5343],{"type":27,"value":3930},{"type":21,"tag":62,"props":5345,"children":5346},{"style":79},[5347],{"type":27,"value":4022},{"type":21,"tag":62,"props":5349,"children":5350},{"class":64,"line":4945},[5351],{"type":21,"tag":62,"props":5352,"children":5353},{"style":79},[5354],{"type":27,"value":960},{"type":21,"tag":62,"props":5356,"children":5357},{"class":64,"line":4958},[5358],{"type":21,"tag":62,"props":5359,"children":5360},{"emptyLinePlaceholder":136},[5361],{"type":27,"value":139},{"type":21,"tag":62,"props":5363,"children":5364},{"class":64,"line":4975},[5365],{"type":21,"tag":62,"props":5366,"children":5367},{"style":69},[5368],{"type":27,"value":5369},"\u002F\u002F Return statement\n",{"type":21,"tag":62,"props":5371,"children":5372},{"class":64,"line":4983},[5373,5377,5382],{"type":21,"tag":62,"props":5374,"children":5375},{"style":85},[5376],{"type":27,"value":891},{"type":21,"tag":62,"props":5378,"children":5379},{"style":894},[5380],{"type":27,"value":5381}," add",{"type":21,"tag":62,"props":5383,"children":5384},{"style":79},[5385],{"type":27,"value":5386},"($a, $b) {\n",{"type":21,"tag":62,"props":5388,"children":5389},{"class":64,"line":4991},[5390,5394,5399,5403,5408],{"type":21,"tag":62,"props":5391,"children":5392},{"style":85},[5393],{"type":27,"value":942},{"type":21,"tag":62,"props":5395,"children":5396},{"style":79},[5397],{"type":27,"value":5398}," $a ",{"type":21,"tag":62,"props":5400,"children":5401},{"style":85},[5402],{"type":27,"value":826},{"type":21,"tag":62,"props":5404,"children":5405},{"style":79},[5406],{"type":27,"value":5407}," $b; ",{"type":21,"tag":62,"props":5409,"children":5410},{"style":69},[5411],{"type":27,"value":5412},"\u002F\u002F Return the sum of $a and $b\n",{"type":21,"tag":62,"props":5414,"children":5415},{"class":64,"line":5000},[5416],{"type":21,"tag":62,"props":5417,"children":5418},{"style":79},[5419],{"type":27,"value":960},{"type":21,"tag":62,"props":5421,"children":5422},{"class":64,"line":5020},[5423,5427,5431,5435,5439,5443,5447,5451],{"type":21,"tag":62,"props":5424,"children":5425},{"style":91},[5426],{"type":27,"value":1008},{"type":21,"tag":62,"props":5428,"children":5429},{"style":894},[5430],{"type":27,"value":5381},{"type":21,"tag":62,"props":5432,"children":5433},{"style":79},[5434],{"type":27,"value":99},{"type":21,"tag":62,"props":5436,"children":5437},{"style":91},[5438],{"type":27,"value":317},{"type":21,"tag":62,"props":5440,"children":5441},{"style":79},[5442],{"type":27,"value":110},{"type":21,"tag":62,"props":5444,"children":5445},{"style":91},[5446],{"type":27,"value":299},{"type":21,"tag":62,"props":5448,"children":5449},{"style":79},[5450],{"type":27,"value":2738},{"type":21,"tag":62,"props":5452,"children":5453},{"style":69},[5454],{"type":27,"value":5455},"\u002F\u002F Outputs: 8\n",{"type":21,"tag":62,"props":5457,"children":5458},{"class":64,"line":5033},[5459],{"type":21,"tag":62,"props":5460,"children":5461},{"emptyLinePlaceholder":136},[5462],{"type":27,"value":139},{"type":21,"tag":62,"props":5464,"children":5465},{"class":64,"line":5045},[5466],{"type":21,"tag":62,"props":5467,"children":5468},{"style":69},[5469],{"type":27,"value":5470},"\u002F\u002F Goto statement\n",{"type":21,"tag":62,"props":5472,"children":5473},{"class":64,"line":5061},[5474,5478,5483],{"type":21,"tag":62,"props":5475,"children":5476},{"style":85},[5477],{"type":27,"value":4336},{"type":21,"tag":62,"props":5479,"children":5480},{"style":91},[5481],{"type":27,"value":5482}," label",{"type":21,"tag":62,"props":5484,"children":5485},{"style":79},[5486],{"type":27,"value":1455},{"type":21,"tag":62,"props":5488,"children":5490},{"class":64,"line":5489},25,[5491,5495,5500],{"type":21,"tag":62,"props":5492,"children":5493},{"style":91},[5494],{"type":27,"value":1008},{"type":21,"tag":62,"props":5496,"children":5497},{"style":102},[5498],{"type":27,"value":5499}," \"This will be skipped.\"",{"type":21,"tag":62,"props":5501,"children":5502},{"style":79},[5503],{"type":27,"value":1455},{"type":21,"tag":62,"props":5505,"children":5507},{"class":64,"line":5506},26,[5508,5513],{"type":21,"tag":62,"props":5509,"children":5510},{"style":894},[5511],{"type":27,"value":5512},"label",{"type":21,"tag":62,"props":5514,"children":5515},{"style":79},[5516],{"type":27,"value":4592},{"type":21,"tag":62,"props":5518,"children":5520},{"class":64,"line":5519},27,[5521,5525,5530],{"type":21,"tag":62,"props":5522,"children":5523},{"style":91},[5524],{"type":27,"value":1008},{"type":21,"tag":62,"props":5526,"children":5527},{"style":102},[5528],{"type":27,"value":5529}," \"This will be executed.\"",{"type":21,"tag":62,"props":5531,"children":5532},{"style":79},[5533],{"type":27,"value":1455},{"type":21,"tag":62,"props":5535,"children":5537},{"class":64,"line":5536},28,[5538],{"type":21,"tag":62,"props":5539,"children":5540},{"style":69},[5541],{"type":27,"value":5542},"\u002F\u002F Outputs: \"This will be executed.\"\n",{"type":21,"tag":62,"props":5544,"children":5546},{"class":64,"line":5545},29,[5547],{"type":21,"tag":62,"props":5548,"children":5549},{"style":69},[5550],{"type":27,"value":5551},"\u002F\u002F Note: The use of `goto` is generally discouraged as it can make code harder to read and maintain.\n",{"type":21,"tag":1221,"props":5553,"children":5554},{},[5555],{"type":27,"value":1225},{"title":8,"searchDepth":132,"depth":132,"links":5557},[5558],{"id":4231,"depth":75,"text":4234,"children":5559},[5560,5561,5562,5563],{"id":4339,"depth":132,"text":4342},{"id":4521,"depth":132,"text":4524},{"id":4702,"depth":132,"text":4705},{"id":5089,"depth":132,"text":5092},"content:php:php-fundamental:flow-control.md","php\u002Fphp-fundamental\u002Fflow-control.md","php\u002Fphp-fundamental\u002Fflow-control",{"_path":5568,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":5569,"description":5570,"tags":5571,"date":15,"weight":252,"body":5573,"_type":1234,"_id":6916,"_source":1236,"_file":6917,"_stem":6918,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Ffunctions","PHP Functions","Essential PHP functions and their usage",[12,13,5572],"functions",{"type":18,"children":5574,"toc":6909},[5575,5580,5592,5681,5686,5780,5785,5875,5887,5983,5988,6133,6138,6144,6149,6311,6317,6322,6420,6426,6431,6515,6521,6526,6900,6905],{"type":21,"tag":22,"props":5576,"children":5577},{"id":5572},[5578],{"type":27,"value":5579},"Functions",{"type":21,"tag":30,"props":5581,"children":5582},{},[5583,5585,5590],{"type":27,"value":5584},"In PHP, a function is a block of code that can be reused to perform a specific task. Functions can take parameters, return values, and be called from anywhere in the code. They are defined using the ",{"type":21,"tag":36,"props":5586,"children":5588},{"className":5587},[],[5589],{"type":27,"value":891},{"type":27,"value":5591}," keyword.",{"type":21,"tag":53,"props":5593,"children":5595},{"className":55,"code":5594,"language":12,"meta":8,"style":8},"function greet($name) {\n    return \"Hello, \" . $name . \"!\";\n}\necho greet(\"John\"); \u002F\u002F Outputs: Hello, John!\n",[5596],{"type":21,"tag":36,"props":5597,"children":5598},{"__ignoreMap":8},[5599,5614,5645,5652],{"type":21,"tag":62,"props":5600,"children":5601},{"class":64,"line":65},[5602,5606,5610],{"type":21,"tag":62,"props":5603,"children":5604},{"style":85},[5605],{"type":27,"value":891},{"type":21,"tag":62,"props":5607,"children":5608},{"style":894},[5609],{"type":27,"value":1871},{"type":21,"tag":62,"props":5611,"children":5612},{"style":79},[5613],{"type":27,"value":1876},{"type":21,"tag":62,"props":5615,"children":5616},{"class":64,"line":75},[5617,5621,5625,5629,5633,5637,5641],{"type":21,"tag":62,"props":5618,"children":5619},{"style":85},[5620],{"type":27,"value":942},{"type":21,"tag":62,"props":5622,"children":5623},{"style":102},[5624],{"type":27,"value":1888},{"type":21,"tag":62,"props":5626,"children":5627},{"style":85},[5628],{"type":27,"value":1893},{"type":21,"tag":62,"props":5630,"children":5631},{"style":79},[5632],{"type":27,"value":1898},{"type":21,"tag":62,"props":5634,"children":5635},{"style":85},[5636],{"type":27,"value":1426},{"type":21,"tag":62,"props":5638,"children":5639},{"style":102},[5640],{"type":27,"value":1907},{"type":21,"tag":62,"props":5642,"children":5643},{"style":79},[5644],{"type":27,"value":1455},{"type":21,"tag":62,"props":5646,"children":5647},{"class":64,"line":132},[5648],{"type":21,"tag":62,"props":5649,"children":5650},{"style":79},[5651],{"type":27,"value":960},{"type":21,"tag":62,"props":5653,"children":5654},{"class":64,"line":142},[5655,5659,5663,5667,5672,5676],{"type":21,"tag":62,"props":5656,"children":5657},{"style":91},[5658],{"type":27,"value":1008},{"type":21,"tag":62,"props":5660,"children":5661},{"style":894},[5662],{"type":27,"value":1871},{"type":21,"tag":62,"props":5664,"children":5665},{"style":79},[5666],{"type":27,"value":99},{"type":21,"tag":62,"props":5668,"children":5669},{"style":102},[5670],{"type":27,"value":5671},"\"John\"",{"type":21,"tag":62,"props":5673,"children":5674},{"style":79},[5675],{"type":27,"value":2738},{"type":21,"tag":62,"props":5677,"children":5678},{"style":69},[5679],{"type":27,"value":5680},"\u002F\u002F Outputs: Hello, John!\n",{"type":21,"tag":30,"props":5682,"children":5683},{},[5684],{"type":27,"value":5685},"Functions can also have default parameter values, which are used if no argument is provided when the function is called.",{"type":21,"tag":53,"props":5687,"children":5689},{"className":55,"code":5688,"language":12,"meta":8,"style":8},"function greet($name = \"Guest\") {\n    return \"Hello, \" . $name . \"!\";\n}\necho greet(); \u002F\u002F Outputs: Hello, Guest!\n",[5690],{"type":21,"tag":36,"props":5691,"children":5692},{"__ignoreMap":8},[5693,5722,5753,5760],{"type":21,"tag":62,"props":5694,"children":5695},{"class":64,"line":65},[5696,5700,5704,5709,5713,5718],{"type":21,"tag":62,"props":5697,"children":5698},{"style":85},[5699],{"type":27,"value":891},{"type":21,"tag":62,"props":5701,"children":5702},{"style":894},[5703],{"type":27,"value":1871},{"type":21,"tag":62,"props":5705,"children":5706},{"style":79},[5707],{"type":27,"value":5708},"($name ",{"type":21,"tag":62,"props":5710,"children":5711},{"style":85},[5712],{"type":27,"value":88},{"type":21,"tag":62,"props":5714,"children":5715},{"style":102},[5716],{"type":27,"value":5717}," \"Guest\"",{"type":21,"tag":62,"props":5719,"children":5720},{"style":79},[5721],{"type":27,"value":3922},{"type":21,"tag":62,"props":5723,"children":5724},{"class":64,"line":75},[5725,5729,5733,5737,5741,5745,5749],{"type":21,"tag":62,"props":5726,"children":5727},{"style":85},[5728],{"type":27,"value":942},{"type":21,"tag":62,"props":5730,"children":5731},{"style":102},[5732],{"type":27,"value":1888},{"type":21,"tag":62,"props":5734,"children":5735},{"style":85},[5736],{"type":27,"value":1893},{"type":21,"tag":62,"props":5738,"children":5739},{"style":79},[5740],{"type":27,"value":1898},{"type":21,"tag":62,"props":5742,"children":5743},{"style":85},[5744],{"type":27,"value":1426},{"type":21,"tag":62,"props":5746,"children":5747},{"style":102},[5748],{"type":27,"value":1907},{"type":21,"tag":62,"props":5750,"children":5751},{"style":79},[5752],{"type":27,"value":1455},{"type":21,"tag":62,"props":5754,"children":5755},{"class":64,"line":132},[5756],{"type":21,"tag":62,"props":5757,"children":5758},{"style":79},[5759],{"type":27,"value":960},{"type":21,"tag":62,"props":5761,"children":5762},{"class":64,"line":142},[5763,5767,5771,5775],{"type":21,"tag":62,"props":5764,"children":5765},{"style":91},[5766],{"type":27,"value":1008},{"type":21,"tag":62,"props":5768,"children":5769},{"style":894},[5770],{"type":27,"value":1871},{"type":21,"tag":62,"props":5772,"children":5773},{"style":79},[5774],{"type":27,"value":3560},{"type":21,"tag":62,"props":5776,"children":5777},{"style":69},[5778],{"type":27,"value":5779},"\u002F\u002F Outputs: Hello, Guest!\n",{"type":21,"tag":30,"props":5781,"children":5782},{},[5783],{"type":27,"value":5784},"Functions can also be defined as anonymous functions (also known as closures) and assigned to variables.",{"type":21,"tag":53,"props":5786,"children":5788},{"className":55,"code":5787,"language":12,"meta":8,"style":8},"$greet = function($name) {\n    return \"Hello, \" . $name . \"!\";\n};\necho $greet(\"John\"); \u002F\u002F Outputs: Hello, John!\n",[5789],{"type":21,"tag":36,"props":5790,"children":5791},{"__ignoreMap":8},[5792,5812,5843,5851],{"type":21,"tag":62,"props":5793,"children":5794},{"class":64,"line":65},[5795,5800,5804,5808],{"type":21,"tag":62,"props":5796,"children":5797},{"style":79},[5798],{"type":27,"value":5799},"$greet ",{"type":21,"tag":62,"props":5801,"children":5802},{"style":85},[5803],{"type":27,"value":88},{"type":21,"tag":62,"props":5805,"children":5806},{"style":85},[5807],{"type":27,"value":3443},{"type":21,"tag":62,"props":5809,"children":5810},{"style":79},[5811],{"type":27,"value":1876},{"type":21,"tag":62,"props":5813,"children":5814},{"class":64,"line":75},[5815,5819,5823,5827,5831,5835,5839],{"type":21,"tag":62,"props":5816,"children":5817},{"style":85},[5818],{"type":27,"value":942},{"type":21,"tag":62,"props":5820,"children":5821},{"style":102},[5822],{"type":27,"value":1888},{"type":21,"tag":62,"props":5824,"children":5825},{"style":85},[5826],{"type":27,"value":1893},{"type":21,"tag":62,"props":5828,"children":5829},{"style":79},[5830],{"type":27,"value":1898},{"type":21,"tag":62,"props":5832,"children":5833},{"style":85},[5834],{"type":27,"value":1426},{"type":21,"tag":62,"props":5836,"children":5837},{"style":102},[5838],{"type":27,"value":1907},{"type":21,"tag":62,"props":5840,"children":5841},{"style":79},[5842],{"type":27,"value":1455},{"type":21,"tag":62,"props":5844,"children":5845},{"class":64,"line":132},[5846],{"type":21,"tag":62,"props":5847,"children":5848},{"style":79},[5849],{"type":27,"value":5850},"};\n",{"type":21,"tag":62,"props":5852,"children":5853},{"class":64,"line":142},[5854,5858,5863,5867,5871],{"type":21,"tag":62,"props":5855,"children":5856},{"style":91},[5857],{"type":27,"value":1008},{"type":21,"tag":62,"props":5859,"children":5860},{"style":79},[5861],{"type":27,"value":5862}," $greet(",{"type":21,"tag":62,"props":5864,"children":5865},{"style":102},[5866],{"type":27,"value":5671},{"type":21,"tag":62,"props":5868,"children":5869},{"style":79},[5870],{"type":27,"value":2738},{"type":21,"tag":62,"props":5872,"children":5873},{"style":69},[5874],{"type":27,"value":5680},{"type":21,"tag":30,"props":5876,"children":5877},{},[5878,5880,5885],{"type":27,"value":5879},"PHP also supports variable-length argument lists using the ",{"type":21,"tag":36,"props":5881,"children":5883},{"className":5882},[],[5884],{"type":27,"value":874},{"type":27,"value":5886}," operator, allowing you to pass an arbitrary number of arguments to a function.",{"type":21,"tag":53,"props":5888,"children":5890},{"className":55,"code":5889,"language":12,"meta":8,"style":8},"function sum(...$numbers) {\n    return array_sum($numbers);\n}\necho sum(1, 2, 3); \u002F\u002F Outputs: 6\n",[5891],{"type":21,"tag":36,"props":5892,"children":5893},{"__ignoreMap":8},[5894,5918,5933,5940],{"type":21,"tag":62,"props":5895,"children":5896},{"class":64,"line":65},[5897,5901,5905,5909,5913],{"type":21,"tag":62,"props":5898,"children":5899},{"style":85},[5900],{"type":27,"value":891},{"type":21,"tag":62,"props":5902,"children":5903},{"style":894},[5904],{"type":27,"value":897},{"type":21,"tag":62,"props":5906,"children":5907},{"style":79},[5908],{"type":27,"value":99},{"type":21,"tag":62,"props":5910,"children":5911},{"style":85},[5912],{"type":27,"value":874},{"type":21,"tag":62,"props":5914,"children":5915},{"style":79},[5916],{"type":27,"value":5917},"$numbers) {\n",{"type":21,"tag":62,"props":5919,"children":5920},{"class":64,"line":75},[5921,5925,5929],{"type":21,"tag":62,"props":5922,"children":5923},{"style":85},[5924],{"type":27,"value":942},{"type":21,"tag":62,"props":5926,"children":5927},{"style":91},[5928],{"type":27,"value":947},{"type":21,"tag":62,"props":5930,"children":5931},{"style":79},[5932],{"type":27,"value":952},{"type":21,"tag":62,"props":5934,"children":5935},{"class":64,"line":132},[5936],{"type":21,"tag":62,"props":5937,"children":5938},{"style":79},[5939],{"type":27,"value":960},{"type":21,"tag":62,"props":5941,"children":5942},{"class":64,"line":142},[5943,5947,5951,5955,5959,5963,5967,5971,5975,5979],{"type":21,"tag":62,"props":5944,"children":5945},{"style":91},[5946],{"type":27,"value":1008},{"type":21,"tag":62,"props":5948,"children":5949},{"style":894},[5950],{"type":27,"value":897},{"type":21,"tag":62,"props":5952,"children":5953},{"style":79},[5954],{"type":27,"value":99},{"type":21,"tag":62,"props":5956,"children":5957},{"style":91},[5958],{"type":27,"value":281},{"type":21,"tag":62,"props":5960,"children":5961},{"style":79},[5962],{"type":27,"value":110},{"type":21,"tag":62,"props":5964,"children":5965},{"style":91},[5966],{"type":27,"value":290},{"type":21,"tag":62,"props":5968,"children":5969},{"style":79},[5970],{"type":27,"value":110},{"type":21,"tag":62,"props":5972,"children":5973},{"style":91},[5974],{"type":27,"value":299},{"type":21,"tag":62,"props":5976,"children":5977},{"style":79},[5978],{"type":27,"value":2738},{"type":21,"tag":62,"props":5980,"children":5981},{"style":69},[5982],{"type":27,"value":1030},{"type":21,"tag":30,"props":5984,"children":5985},{},[5986],{"type":27,"value":5987},"Functions can also be recursive, meaning they can call themselves to solve a problem.",{"type":21,"tag":53,"props":5989,"children":5991},{"className":55,"code":5990,"language":12,"meta":8,"style":8},"function factorial($n) {\n    if ($n \u003C= 1) {\n        return 1;\n    }\n    return $n * factorial($n - 1);\n}\necho factorial(5); \u002F\u002F Outputs: 120\n",[5992],{"type":21,"tag":36,"props":5993,"children":5994},{"__ignoreMap":8},[5995,6012,6038,6053,6060,6098,6105],{"type":21,"tag":62,"props":5996,"children":5997},{"class":64,"line":65},[5998,6002,6007],{"type":21,"tag":62,"props":5999,"children":6000},{"style":85},[6001],{"type":27,"value":891},{"type":21,"tag":62,"props":6003,"children":6004},{"style":894},[6005],{"type":27,"value":6006}," factorial",{"type":21,"tag":62,"props":6008,"children":6009},{"style":79},[6010],{"type":27,"value":6011},"($n) {\n",{"type":21,"tag":62,"props":6013,"children":6014},{"class":64,"line":75},[6015,6019,6024,6029,6034],{"type":21,"tag":62,"props":6016,"children":6017},{"style":85},[6018],{"type":27,"value":5164},{"type":21,"tag":62,"props":6020,"children":6021},{"style":79},[6022],{"type":27,"value":6023}," ($n ",{"type":21,"tag":62,"props":6025,"children":6026},{"style":85},[6027],{"type":27,"value":6028},"\u003C=",{"type":21,"tag":62,"props":6030,"children":6031},{"style":91},[6032],{"type":27,"value":6033}," 1",{"type":21,"tag":62,"props":6035,"children":6036},{"style":79},[6037],{"type":27,"value":3922},{"type":21,"tag":62,"props":6039,"children":6040},{"class":64,"line":132},[6041,6045,6049],{"type":21,"tag":62,"props":6042,"children":6043},{"style":85},[6044],{"type":27,"value":3461},{"type":21,"tag":62,"props":6046,"children":6047},{"style":91},[6048],{"type":27,"value":6033},{"type":21,"tag":62,"props":6050,"children":6051},{"style":79},[6052],{"type":27,"value":1455},{"type":21,"tag":62,"props":6054,"children":6055},{"class":64,"line":142},[6056],{"type":21,"tag":62,"props":6057,"children":6058},{"style":79},[6059],{"type":27,"value":3478},{"type":21,"tag":62,"props":6061,"children":6062},{"class":64,"line":151},[6063,6067,6072,6077,6081,6086,6090,6094],{"type":21,"tag":62,"props":6064,"children":6065},{"style":85},[6066],{"type":27,"value":942},{"type":21,"tag":62,"props":6068,"children":6069},{"style":79},[6070],{"type":27,"value":6071}," $n ",{"type":21,"tag":62,"props":6073,"children":6074},{"style":85},[6075],{"type":27,"value":6076},"*",{"type":21,"tag":62,"props":6078,"children":6079},{"style":894},[6080],{"type":27,"value":6006},{"type":21,"tag":62,"props":6082,"children":6083},{"style":79},[6084],{"type":27,"value":6085},"($n ",{"type":21,"tag":62,"props":6087,"children":6088},{"style":85},[6089],{"type":27,"value":1086},{"type":21,"tag":62,"props":6091,"children":6092},{"style":91},[6093],{"type":27,"value":6033},{"type":21,"tag":62,"props":6095,"children":6096},{"style":79},[6097],{"type":27,"value":129},{"type":21,"tag":62,"props":6099,"children":6100},{"class":64,"line":173},[6101],{"type":21,"tag":62,"props":6102,"children":6103},{"style":79},[6104],{"type":27,"value":960},{"type":21,"tag":62,"props":6106,"children":6107},{"class":64,"line":197},[6108,6112,6116,6120,6124,6128],{"type":21,"tag":62,"props":6109,"children":6110},{"style":91},[6111],{"type":27,"value":1008},{"type":21,"tag":62,"props":6113,"children":6114},{"style":894},[6115],{"type":27,"value":6006},{"type":21,"tag":62,"props":6117,"children":6118},{"style":79},[6119],{"type":27,"value":99},{"type":21,"tag":62,"props":6121,"children":6122},{"style":91},[6123],{"type":27,"value":317},{"type":21,"tag":62,"props":6125,"children":6126},{"style":79},[6127],{"type":27,"value":2738},{"type":21,"tag":62,"props":6129,"children":6130},{"style":69},[6131],{"type":27,"value":6132},"\u002F\u002F Outputs: 120\n",{"type":21,"tag":30,"props":6134,"children":6135},{},[6136],{"type":27,"value":6137},"PHP has many built-in functions for various tasks, such as string manipulation, array handling, and more. You can also create your own custom functions to suit your specific needs. Understanding how to define and use functions is essential for writing clean, efficient, and maintainable PHP code.",{"type":21,"tag":22,"props":6139,"children":6141},{"id":6140},"built-in-functions",[6142],{"type":27,"value":6143},"Built-in Functions",{"type":21,"tag":30,"props":6145,"children":6146},{},[6147],{"type":27,"value":6148},"PHP provides a wide range of built-in functions that can be used for various purposes. Some common categories of built-in functions include:",{"type":21,"tag":1318,"props":6150,"children":6151},{},[6152,6176,6202,6228,6254,6280,6306],{"type":21,"tag":1322,"props":6153,"children":6154},{},[6155,6157,6162,6163,6168,6169,6174],{"type":27,"value":6156},"String functions: ",{"type":21,"tag":36,"props":6158,"children":6160},{"className":6159},[],[6161],{"type":27,"value":2568},{"type":27,"value":110},{"type":21,"tag":36,"props":6164,"children":6166},{"className":6165},[],[6167],{"type":27,"value":2612},{"type":27,"value":110},{"type":21,"tag":36,"props":6170,"children":6172},{"className":6171},[],[6173],{"type":27,"value":2601},{"type":27,"value":6175},", etc.",{"type":21,"tag":1322,"props":6177,"children":6178},{},[6179,6181,6187,6188,6194,6195,6201],{"type":27,"value":6180},"Array functions: ",{"type":21,"tag":36,"props":6182,"children":6184},{"className":6183},[],[6185],{"type":27,"value":6186},"array_push()",{"type":27,"value":110},{"type":21,"tag":36,"props":6189,"children":6191},{"className":6190},[],[6192],{"type":27,"value":6193},"array_pop()",{"type":27,"value":110},{"type":21,"tag":36,"props":6196,"children":6198},{"className":6197},[],[6199],{"type":27,"value":6200},"array_merge()",{"type":27,"value":6175},{"type":21,"tag":1322,"props":6203,"children":6204},{},[6205,6207,6213,6214,6220,6221,6227],{"type":27,"value":6206},"Date and time functions: ",{"type":21,"tag":36,"props":6208,"children":6210},{"className":6209},[],[6211],{"type":27,"value":6212},"date()",{"type":27,"value":110},{"type":21,"tag":36,"props":6215,"children":6217},{"className":6216},[],[6218],{"type":27,"value":6219},"time()",{"type":27,"value":110},{"type":21,"tag":36,"props":6222,"children":6224},{"className":6223},[],[6225],{"type":27,"value":6226},"strtotime()",{"type":27,"value":6175},{"type":21,"tag":1322,"props":6229,"children":6230},{},[6231,6233,6239,6240,6246,6247,6253],{"type":27,"value":6232},"Math functions: ",{"type":21,"tag":36,"props":6234,"children":6236},{"className":6235},[],[6237],{"type":27,"value":6238},"abs()",{"type":27,"value":110},{"type":21,"tag":36,"props":6241,"children":6243},{"className":6242},[],[6244],{"type":27,"value":6245},"round()",{"type":27,"value":110},{"type":21,"tag":36,"props":6248,"children":6250},{"className":6249},[],[6251],{"type":27,"value":6252},"rand()",{"type":27,"value":6175},{"type":21,"tag":1322,"props":6255,"children":6256},{},[6257,6259,6265,6266,6272,6273,6279],{"type":27,"value":6258},"File handling functions: ",{"type":21,"tag":36,"props":6260,"children":6262},{"className":6261},[],[6263],{"type":27,"value":6264},"fopen()",{"type":27,"value":110},{"type":21,"tag":36,"props":6267,"children":6269},{"className":6268},[],[6270],{"type":27,"value":6271},"fread()",{"type":27,"value":110},{"type":21,"tag":36,"props":6274,"children":6276},{"className":6275},[],[6277],{"type":27,"value":6278},"fwrite()",{"type":27,"value":6175},{"type":21,"tag":1322,"props":6281,"children":6282},{},[6283,6285,6291,6292,6298,6299,6305],{"type":27,"value":6284},"Database functions: ",{"type":21,"tag":36,"props":6286,"children":6288},{"className":6287},[],[6289],{"type":27,"value":6290},"mysqli_connect()",{"type":27,"value":110},{"type":21,"tag":36,"props":6293,"children":6295},{"className":6294},[],[6296],{"type":27,"value":6297},"mysqli_query()",{"type":27,"value":110},{"type":21,"tag":36,"props":6300,"children":6302},{"className":6301},[],[6303],{"type":27,"value":6304},"PDO",{"type":27,"value":6175},{"type":21,"tag":1322,"props":6307,"children":6308},{},[6309],{"type":27,"value":6310},"And many more! You can refer to the official PHP documentation for a comprehensive list of built-in functions and their usage.",{"type":21,"tag":22,"props":6312,"children":6314},{"id":6313},"user-defined-functions",[6315],{"type":27,"value":6316},"User-defined Functions",{"type":21,"tag":30,"props":6318,"children":6319},{},[6320],{"type":27,"value":6321},"In addition to built-in functions, you can create your own user-defined functions in PHP. This allows you to encapsulate reusable code and improve the organization of your application. User-defined functions can be defined anywhere in your code, but it's common practice to define them at the beginning of your script or in separate files for better maintainability.",{"type":21,"tag":53,"props":6323,"children":6325},{"className":55,"code":6324,"language":12,"meta":8,"style":8},"function calculateArea($radius) {\n    return pi() * pow($radius, 2);\n}\necho calculateArea(5); \u002F\u002F Outputs: 78.539816339745\n",[6326],{"type":21,"tag":36,"props":6327,"children":6328},{"__ignoreMap":8},[6329,6346,6385,6392],{"type":21,"tag":62,"props":6330,"children":6331},{"class":64,"line":65},[6332,6336,6341],{"type":21,"tag":62,"props":6333,"children":6334},{"style":85},[6335],{"type":27,"value":891},{"type":21,"tag":62,"props":6337,"children":6338},{"style":894},[6339],{"type":27,"value":6340}," calculateArea",{"type":21,"tag":62,"props":6342,"children":6343},{"style":79},[6344],{"type":27,"value":6345},"($radius) {\n",{"type":21,"tag":62,"props":6347,"children":6348},{"class":64,"line":75},[6349,6353,6358,6363,6367,6372,6377,6381],{"type":21,"tag":62,"props":6350,"children":6351},{"style":85},[6352],{"type":27,"value":942},{"type":21,"tag":62,"props":6354,"children":6355},{"style":91},[6356],{"type":27,"value":6357}," pi",{"type":21,"tag":62,"props":6359,"children":6360},{"style":79},[6361],{"type":27,"value":6362},"() ",{"type":21,"tag":62,"props":6364,"children":6365},{"style":85},[6366],{"type":27,"value":6076},{"type":21,"tag":62,"props":6368,"children":6369},{"style":91},[6370],{"type":27,"value":6371}," pow",{"type":21,"tag":62,"props":6373,"children":6374},{"style":79},[6375],{"type":27,"value":6376},"($radius, ",{"type":21,"tag":62,"props":6378,"children":6379},{"style":91},[6380],{"type":27,"value":290},{"type":21,"tag":62,"props":6382,"children":6383},{"style":79},[6384],{"type":27,"value":129},{"type":21,"tag":62,"props":6386,"children":6387},{"class":64,"line":132},[6388],{"type":21,"tag":62,"props":6389,"children":6390},{"style":79},[6391],{"type":27,"value":960},{"type":21,"tag":62,"props":6393,"children":6394},{"class":64,"line":142},[6395,6399,6403,6407,6411,6415],{"type":21,"tag":62,"props":6396,"children":6397},{"style":91},[6398],{"type":27,"value":1008},{"type":21,"tag":62,"props":6400,"children":6401},{"style":894},[6402],{"type":27,"value":6340},{"type":21,"tag":62,"props":6404,"children":6405},{"style":79},[6406],{"type":27,"value":99},{"type":21,"tag":62,"props":6408,"children":6409},{"style":91},[6410],{"type":27,"value":317},{"type":21,"tag":62,"props":6412,"children":6413},{"style":79},[6414],{"type":27,"value":2738},{"type":21,"tag":62,"props":6416,"children":6417},{"style":69},[6418],{"type":27,"value":6419},"\u002F\u002F Outputs: 78.539816339745\n",{"type":21,"tag":22,"props":6421,"children":6423},{"id":6422},"variable-functions",[6424],{"type":27,"value":6425},"Variable Functions",{"type":21,"tag":30,"props":6427,"children":6428},{},[6429],{"type":27,"value":6430},"In PHP, you can also use variable functions, which allow you to call a function using a variable that contains the function name. This can be useful for dynamic function calls.",{"type":21,"tag":53,"props":6432,"children":6434},{"className":55,"code":6433,"language":12,"meta":8,"style":8},"function sayHello() {\n    return \"Hello!\";\n}\n$functionName = \"sayHello\";\necho $functionName(); \u002F\u002F Outputs: Hello!\n",[6435],{"type":21,"tag":36,"props":6436,"children":6437},{"__ignoreMap":8},[6438,6454,6470,6477,6498],{"type":21,"tag":62,"props":6439,"children":6440},{"class":64,"line":65},[6441,6445,6450],{"type":21,"tag":62,"props":6442,"children":6443},{"style":85},[6444],{"type":27,"value":891},{"type":21,"tag":62,"props":6446,"children":6447},{"style":894},[6448],{"type":27,"value":6449}," sayHello",{"type":21,"tag":62,"props":6451,"children":6452},{"style":79},[6453],{"type":27,"value":3453},{"type":21,"tag":62,"props":6455,"children":6456},{"class":64,"line":75},[6457,6461,6466],{"type":21,"tag":62,"props":6458,"children":6459},{"style":85},[6460],{"type":27,"value":942},{"type":21,"tag":62,"props":6462,"children":6463},{"style":102},[6464],{"type":27,"value":6465}," \"Hello!\"",{"type":21,"tag":62,"props":6467,"children":6468},{"style":79},[6469],{"type":27,"value":1455},{"type":21,"tag":62,"props":6471,"children":6472},{"class":64,"line":132},[6473],{"type":21,"tag":62,"props":6474,"children":6475},{"style":79},[6476],{"type":27,"value":960},{"type":21,"tag":62,"props":6478,"children":6479},{"class":64,"line":142},[6480,6485,6489,6494],{"type":21,"tag":62,"props":6481,"children":6482},{"style":79},[6483],{"type":27,"value":6484},"$functionName ",{"type":21,"tag":62,"props":6486,"children":6487},{"style":85},[6488],{"type":27,"value":88},{"type":21,"tag":62,"props":6490,"children":6491},{"style":102},[6492],{"type":27,"value":6493}," \"sayHello\"",{"type":21,"tag":62,"props":6495,"children":6496},{"style":79},[6497],{"type":27,"value":1455},{"type":21,"tag":62,"props":6499,"children":6500},{"class":64,"line":151},[6501,6505,6510],{"type":21,"tag":62,"props":6502,"children":6503},{"style":91},[6504],{"type":27,"value":1008},{"type":21,"tag":62,"props":6506,"children":6507},{"style":79},[6508],{"type":27,"value":6509}," $functionName(); ",{"type":21,"tag":62,"props":6511,"children":6512},{"style":69},[6513],{"type":27,"value":6514},"\u002F\u002F Outputs: Hello!\n",{"type":21,"tag":22,"props":6516,"children":6518},{"id":6517},"operators-in-functions",[6519],{"type":27,"value":6520},"Operators in Functions",{"type":21,"tag":30,"props":6522,"children":6523},{},[6524],{"type":27,"value":6525},"Operators can be used within functions to perform various operations. For example, you can use arithmetic operators to perform calculations, comparison operators to compare values, and logical operators to combine conditions.",{"type":21,"tag":53,"props":6527,"children":6529},{"className":55,"code":6528,"language":12,"meta":8,"style":8},"function calculate($a, $b) {\n    $sum = $a + $b; \u002F\u002F Using arithmetic operator\n    $isEqual = ($a == $b); \u002F\u002F Using comparison operator\n    $isGreater = ($a > $b); \u002F\u002F Using comparison operator\n    return [\n        'sum' => $sum,\n        'isEqual' => $isEqual,\n        'isGreater' => $isGreater\n    ];\n}\n$result = calculate(5, 3);\necho \"Sum: \" . $result['sum']; \u002F\u002F Outputs: Sum: 8\necho \"Is Equal: \" . ($result['isEqual'] ? \"Yes\" : \"No\"); \u002F\u002F Outputs: Is Equal: No\necho \"Is Greater: \" . ($result['isGreater'] ? \"Yes\" : \"No\"); \u002F\u002F Outputs: Is Greater: Yes\n",[6530],{"type":21,"tag":36,"props":6531,"children":6532},{"__ignoreMap":8},[6533,6549,6578,6609,6638,6649,6666,6683,6700,6708,6715,6750,6786,6846],{"type":21,"tag":62,"props":6534,"children":6535},{"class":64,"line":65},[6536,6540,6545],{"type":21,"tag":62,"props":6537,"children":6538},{"style":85},[6539],{"type":27,"value":891},{"type":21,"tag":62,"props":6541,"children":6542},{"style":894},[6543],{"type":27,"value":6544}," calculate",{"type":21,"tag":62,"props":6546,"children":6547},{"style":79},[6548],{"type":27,"value":5386},{"type":21,"tag":62,"props":6550,"children":6551},{"class":64,"line":75},[6552,6557,6561,6565,6569,6573],{"type":21,"tag":62,"props":6553,"children":6554},{"style":79},[6555],{"type":27,"value":6556},"    $sum ",{"type":21,"tag":62,"props":6558,"children":6559},{"style":85},[6560],{"type":27,"value":88},{"type":21,"tag":62,"props":6562,"children":6563},{"style":79},[6564],{"type":27,"value":5398},{"type":21,"tag":62,"props":6566,"children":6567},{"style":85},[6568],{"type":27,"value":826},{"type":21,"tag":62,"props":6570,"children":6571},{"style":79},[6572],{"type":27,"value":5407},{"type":21,"tag":62,"props":6574,"children":6575},{"style":69},[6576],{"type":27,"value":6577},"\u002F\u002F Using arithmetic operator\n",{"type":21,"tag":62,"props":6579,"children":6580},{"class":64,"line":132},[6581,6586,6590,6595,6599,6604],{"type":21,"tag":62,"props":6582,"children":6583},{"style":79},[6584],{"type":27,"value":6585},"    $isEqual ",{"type":21,"tag":62,"props":6587,"children":6588},{"style":85},[6589],{"type":27,"value":88},{"type":21,"tag":62,"props":6591,"children":6592},{"style":79},[6593],{"type":27,"value":6594}," ($a ",{"type":21,"tag":62,"props":6596,"children":6597},{"style":85},[6598],{"type":27,"value":5173},{"type":21,"tag":62,"props":6600,"children":6601},{"style":79},[6602],{"type":27,"value":6603}," $b); ",{"type":21,"tag":62,"props":6605,"children":6606},{"style":69},[6607],{"type":27,"value":6608},"\u002F\u002F Using comparison operator\n",{"type":21,"tag":62,"props":6610,"children":6611},{"class":64,"line":142},[6612,6617,6621,6625,6630,6634],{"type":21,"tag":62,"props":6613,"children":6614},{"style":79},[6615],{"type":27,"value":6616},"    $isGreater ",{"type":21,"tag":62,"props":6618,"children":6619},{"style":85},[6620],{"type":27,"value":88},{"type":21,"tag":62,"props":6622,"children":6623},{"style":79},[6624],{"type":27,"value":6594},{"type":21,"tag":62,"props":6626,"children":6627},{"style":85},[6628],{"type":27,"value":6629},">",{"type":21,"tag":62,"props":6631,"children":6632},{"style":79},[6633],{"type":27,"value":6603},{"type":21,"tag":62,"props":6635,"children":6636},{"style":69},[6637],{"type":27,"value":6608},{"type":21,"tag":62,"props":6639,"children":6640},{"class":64,"line":151},[6641,6645],{"type":21,"tag":62,"props":6642,"children":6643},{"style":85},[6644],{"type":27,"value":942},{"type":21,"tag":62,"props":6646,"children":6647},{"style":79},[6648],{"type":27,"value":649},{"type":21,"tag":62,"props":6650,"children":6651},{"class":64,"line":173},[6652,6657,6661],{"type":21,"tag":62,"props":6653,"children":6654},{"style":102},[6655],{"type":27,"value":6656},"        'sum'",{"type":21,"tag":62,"props":6658,"children":6659},{"style":85},[6660],{"type":27,"value":184},{"type":21,"tag":62,"props":6662,"children":6663},{"style":79},[6664],{"type":27,"value":6665}," $sum,\n",{"type":21,"tag":62,"props":6667,"children":6668},{"class":64,"line":197},[6669,6674,6678],{"type":21,"tag":62,"props":6670,"children":6671},{"style":102},[6672],{"type":27,"value":6673},"        'isEqual'",{"type":21,"tag":62,"props":6675,"children":6676},{"style":85},[6677],{"type":27,"value":184},{"type":21,"tag":62,"props":6679,"children":6680},{"style":79},[6681],{"type":27,"value":6682}," $isEqual,\n",{"type":21,"tag":62,"props":6684,"children":6685},{"class":64,"line":219},[6686,6691,6695],{"type":21,"tag":62,"props":6687,"children":6688},{"style":102},[6689],{"type":27,"value":6690},"        'isGreater'",{"type":21,"tag":62,"props":6692,"children":6693},{"style":85},[6694],{"type":27,"value":184},{"type":21,"tag":62,"props":6696,"children":6697},{"style":79},[6698],{"type":27,"value":6699}," $isGreater\n",{"type":21,"tag":62,"props":6701,"children":6702},{"class":64,"line":16},[6703],{"type":21,"tag":62,"props":6704,"children":6705},{"style":79},[6706],{"type":27,"value":6707},"    ];\n",{"type":21,"tag":62,"props":6709,"children":6710},{"class":64,"line":244},[6711],{"type":21,"tag":62,"props":6712,"children":6713},{"style":79},[6714],{"type":27,"value":960},{"type":21,"tag":62,"props":6716,"children":6717},{"class":64,"line":252},[6718,6722,6726,6730,6734,6738,6742,6746],{"type":21,"tag":62,"props":6719,"children":6720},{"style":79},[6721],{"type":27,"value":1548},{"type":21,"tag":62,"props":6723,"children":6724},{"style":85},[6725],{"type":27,"value":88},{"type":21,"tag":62,"props":6727,"children":6728},{"style":894},[6729],{"type":27,"value":6544},{"type":21,"tag":62,"props":6731,"children":6732},{"style":79},[6733],{"type":27,"value":99},{"type":21,"tag":62,"props":6735,"children":6736},{"style":91},[6737],{"type":27,"value":317},{"type":21,"tag":62,"props":6739,"children":6740},{"style":79},[6741],{"type":27,"value":110},{"type":21,"tag":62,"props":6743,"children":6744},{"style":91},[6745],{"type":27,"value":299},{"type":21,"tag":62,"props":6747,"children":6748},{"style":79},[6749],{"type":27,"value":129},{"type":21,"tag":62,"props":6751,"children":6752},{"class":64,"line":261},[6753,6757,6762,6766,6771,6776,6781],{"type":21,"tag":62,"props":6754,"children":6755},{"style":91},[6756],{"type":27,"value":1008},{"type":21,"tag":62,"props":6758,"children":6759},{"style":102},[6760],{"type":27,"value":6761}," \"Sum: \"",{"type":21,"tag":62,"props":6763,"children":6764},{"style":85},[6765],{"type":27,"value":1893},{"type":21,"tag":62,"props":6767,"children":6768},{"style":79},[6769],{"type":27,"value":6770}," $result[",{"type":21,"tag":62,"props":6772,"children":6773},{"style":102},[6774],{"type":27,"value":6775},"'sum'",{"type":21,"tag":62,"props":6777,"children":6778},{"style":79},[6779],{"type":27,"value":6780},"]; ",{"type":21,"tag":62,"props":6782,"children":6783},{"style":69},[6784],{"type":27,"value":6785},"\u002F\u002F Outputs: Sum: 8\n",{"type":21,"tag":62,"props":6787,"children":6788},{"class":64,"line":4899},[6789,6793,6798,6802,6807,6812,6817,6822,6827,6832,6837,6841],{"type":21,"tag":62,"props":6790,"children":6791},{"style":91},[6792],{"type":27,"value":1008},{"type":21,"tag":62,"props":6794,"children":6795},{"style":102},[6796],{"type":27,"value":6797}," \"Is Equal: \"",{"type":21,"tag":62,"props":6799,"children":6800},{"style":85},[6801],{"type":27,"value":1893},{"type":21,"tag":62,"props":6803,"children":6804},{"style":79},[6805],{"type":27,"value":6806}," ($result[",{"type":21,"tag":62,"props":6808,"children":6809},{"style":102},[6810],{"type":27,"value":6811},"'isEqual'",{"type":21,"tag":62,"props":6813,"children":6814},{"style":79},[6815],{"type":27,"value":6816},"] ",{"type":21,"tag":62,"props":6818,"children":6819},{"style":85},[6820],{"type":27,"value":6821},"?",{"type":21,"tag":62,"props":6823,"children":6824},{"style":102},[6825],{"type":27,"value":6826}," \"Yes\"",{"type":21,"tag":62,"props":6828,"children":6829},{"style":85},[6830],{"type":27,"value":6831}," :",{"type":21,"tag":62,"props":6833,"children":6834},{"style":102},[6835],{"type":27,"value":6836}," \"No\"",{"type":21,"tag":62,"props":6838,"children":6839},{"style":79},[6840],{"type":27,"value":2738},{"type":21,"tag":62,"props":6842,"children":6843},{"style":69},[6844],{"type":27,"value":6845},"\u002F\u002F Outputs: Is Equal: No\n",{"type":21,"tag":62,"props":6847,"children":6848},{"class":64,"line":4920},[6849,6853,6858,6862,6866,6871,6875,6879,6883,6887,6891,6895],{"type":21,"tag":62,"props":6850,"children":6851},{"style":91},[6852],{"type":27,"value":1008},{"type":21,"tag":62,"props":6854,"children":6855},{"style":102},[6856],{"type":27,"value":6857}," \"Is Greater: \"",{"type":21,"tag":62,"props":6859,"children":6860},{"style":85},[6861],{"type":27,"value":1893},{"type":21,"tag":62,"props":6863,"children":6864},{"style":79},[6865],{"type":27,"value":6806},{"type":21,"tag":62,"props":6867,"children":6868},{"style":102},[6869],{"type":27,"value":6870},"'isGreater'",{"type":21,"tag":62,"props":6872,"children":6873},{"style":79},[6874],{"type":27,"value":6816},{"type":21,"tag":62,"props":6876,"children":6877},{"style":85},[6878],{"type":27,"value":6821},{"type":21,"tag":62,"props":6880,"children":6881},{"style":102},[6882],{"type":27,"value":6826},{"type":21,"tag":62,"props":6884,"children":6885},{"style":85},[6886],{"type":27,"value":6831},{"type":21,"tag":62,"props":6888,"children":6889},{"style":102},[6890],{"type":27,"value":6836},{"type":21,"tag":62,"props":6892,"children":6893},{"style":79},[6894],{"type":27,"value":2738},{"type":21,"tag":62,"props":6896,"children":6897},{"style":69},[6898],{"type":27,"value":6899},"\u002F\u002F Outputs: Is Greater: Yes\n",{"type":21,"tag":30,"props":6901,"children":6902},{},[6903],{"type":27,"value":6904},"You can also use other types of operators, such as assignment operators, bitwise operators, and more, within your functions to perform various tasks. The choice of operators will depend on the specific logic you want to implement in your function.",{"type":21,"tag":1221,"props":6906,"children":6907},{},[6908],{"type":27,"value":1225},{"title":8,"searchDepth":132,"depth":132,"links":6910},[6911,6912,6913,6914,6915],{"id":5572,"depth":75,"text":5579},{"id":6140,"depth":75,"text":6143},{"id":6313,"depth":75,"text":6316},{"id":6422,"depth":75,"text":6425},{"id":6517,"depth":75,"text":6520},"content:php:php-fundamental:functions.md","php\u002Fphp-fundamental\u002Ffunctions.md","php\u002Fphp-fundamental\u002Ffunctions",{"_path":6920,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":6921,"description":6922,"tags":6923,"date":15,"weight":261,"body":6926,"_type":1234,"_id":7107,"_source":1236,"_file":7108,"_stem":7109,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Finclude-require","PHP Include and Require","Understanding PHP include and require statements",[12,13,6924,6925],"include","require",{"type":18,"children":6927,"toc":7102},[6928,6933,6952,6996,7001,7019,7062,7066,7098],{"type":21,"tag":22,"props":6929,"children":6930},{"id":6924},[6931],{"type":27,"value":6932},"Include",{"type":21,"tag":30,"props":6934,"children":6935},{},[6936,6938,6943,6945,6950],{"type":27,"value":6937},"In PHP, the ",{"type":21,"tag":36,"props":6939,"children":6941},{"className":6940},[],[6942],{"type":27,"value":6924},{"type":27,"value":6944}," statement is used to include and evaluate a specified file. The content of the included file is inserted into the script at the point where the ",{"type":21,"tag":36,"props":6946,"children":6948},{"className":6947},[],[6949],{"type":27,"value":6924},{"type":27,"value":6951}," statement is used. If the file cannot be found, a warning is issued, but the script will continue to execute.",{"type":21,"tag":53,"props":6953,"children":6955},{"className":55,"code":6954,"language":12,"meta":8,"style":8},"include 'header.php'; \u002F\u002F Includes the header.php file\necho \"This is the main content of the page.\";\n",[6956],{"type":21,"tag":36,"props":6957,"children":6958},{"__ignoreMap":8},[6959,6980],{"type":21,"tag":62,"props":6960,"children":6961},{"class":64,"line":65},[6962,6966,6971,6975],{"type":21,"tag":62,"props":6963,"children":6964},{"style":85},[6965],{"type":27,"value":6924},{"type":21,"tag":62,"props":6967,"children":6968},{"style":102},[6969],{"type":27,"value":6970}," 'header.php'",{"type":21,"tag":62,"props":6972,"children":6973},{"style":79},[6974],{"type":27,"value":1571},{"type":21,"tag":62,"props":6976,"children":6977},{"style":69},[6978],{"type":27,"value":6979},"\u002F\u002F Includes the header.php file\n",{"type":21,"tag":62,"props":6981,"children":6982},{"class":64,"line":75},[6983,6987,6992],{"type":21,"tag":62,"props":6984,"children":6985},{"style":91},[6986],{"type":27,"value":1008},{"type":21,"tag":62,"props":6988,"children":6989},{"style":102},[6990],{"type":27,"value":6991}," \"This is the main content of the page.\"",{"type":21,"tag":62,"props":6993,"children":6994},{"style":79},[6995],{"type":27,"value":1455},{"type":21,"tag":22,"props":6997,"children":6998},{"id":6925},[6999],{"type":27,"value":7000},"Require",{"type":21,"tag":30,"props":7002,"children":7003},{},[7004,7005,7010,7012,7017],{"type":27,"value":333},{"type":21,"tag":36,"props":7006,"children":7008},{"className":7007},[],[7009],{"type":27,"value":6925},{"type":27,"value":7011}," statement is similar to ",{"type":21,"tag":36,"props":7013,"children":7015},{"className":7014},[],[7016],{"type":27,"value":6924},{"type":27,"value":7018},", but it behaves differently when the specified file cannot be found. If the file cannot be found, a fatal error is issued, and the script will stop executing.",{"type":21,"tag":53,"props":7020,"children":7022},{"className":55,"code":7021,"language":12,"meta":8,"style":8},"require 'config.php'; \u002F\u002F Requires the config.php file or stops execution if it cannot be found\necho \"This is the main content of the page.\";\n",[7023],{"type":21,"tag":36,"props":7024,"children":7025},{"__ignoreMap":8},[7026,7047],{"type":21,"tag":62,"props":7027,"children":7028},{"class":64,"line":65},[7029,7033,7038,7042],{"type":21,"tag":62,"props":7030,"children":7031},{"style":85},[7032],{"type":27,"value":6925},{"type":21,"tag":62,"props":7034,"children":7035},{"style":102},[7036],{"type":27,"value":7037}," 'config.php'",{"type":21,"tag":62,"props":7039,"children":7040},{"style":79},[7041],{"type":27,"value":1571},{"type":21,"tag":62,"props":7043,"children":7044},{"style":69},[7045],{"type":27,"value":7046},"\u002F\u002F Requires the config.php file or stops execution if it cannot be found\n",{"type":21,"tag":62,"props":7048,"children":7049},{"class":64,"line":75},[7050,7054,7058],{"type":21,"tag":62,"props":7051,"children":7052},{"style":91},[7053],{"type":27,"value":1008},{"type":21,"tag":62,"props":7055,"children":7056},{"style":102},[7057],{"type":27,"value":6991},{"type":21,"tag":62,"props":7059,"children":7060},{"style":79},[7061],{"type":27,"value":1455},{"type":21,"tag":22,"props":7063,"children":7064},{"id":1596},[7065],{"type":27,"value":1599},{"type":21,"tag":30,"props":7067,"children":7068},{},[7069,7071,7076,7077,7082,7084,7089,7091,7096],{"type":27,"value":7070},"Both ",{"type":21,"tag":36,"props":7072,"children":7074},{"className":7073},[],[7075],{"type":27,"value":6924},{"type":27,"value":3159},{"type":21,"tag":36,"props":7078,"children":7080},{"className":7079},[],[7081],{"type":27,"value":6925},{"type":27,"value":7083}," are used to include files in PHP, but they differ in their error handling. Use ",{"type":21,"tag":36,"props":7085,"children":7087},{"className":7086},[],[7088],{"type":27,"value":6924},{"type":27,"value":7090}," when the file is optional and the script can continue without it, and use ",{"type":21,"tag":36,"props":7092,"children":7094},{"className":7093},[],[7095],{"type":27,"value":6925},{"type":27,"value":7097}," when the file is essential for the application to run. Always ensure that the paths to the included or required files are correct to avoid errors.",{"type":21,"tag":1221,"props":7099,"children":7100},{},[7101],{"type":27,"value":1225},{"title":8,"searchDepth":132,"depth":132,"links":7103},[7104,7105,7106],{"id":6924,"depth":75,"text":6932},{"id":6925,"depth":75,"text":7000},{"id":1596,"depth":75,"text":1599},"content:php:php-fundamental:include-require.md","php\u002Fphp-fundamental\u002Finclude-require.md","php\u002Fphp-fundamental\u002Finclude-require",{"_path":7111,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":7112,"description":7113,"tags":7114,"date":15,"weight":65,"body":7116,"_type":1234,"_id":7253,"_source":1236,"_file":7254,"_stem":7255,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Fintroduction","PHP Introduction","An introduction to PHP programming language and its fundamentals",[12,13,7115],"introduction",{"type":18,"children":7117,"toc":7246},[7118,7124,7129,7135,7188,7194,7237,7241],{"type":21,"tag":22,"props":7119,"children":7121},{"id":7120},"introduction-to-php",[7122],{"type":27,"value":7123},"Introduction to PHP",{"type":21,"tag":30,"props":7125,"children":7126},{},[7127],{"type":27,"value":7128},"PHP (Hypertext Preprocessor) is a widely-used open-source server-side scripting language that is especially suited for web development. It was created by Rasmus Lerdorf in 1994 and has since evolved into a powerful language used by millions of developers worldwide. PHP is known for its simplicity, flexibility, and ability to integrate seamlessly with various databases and web technologies.",{"type":21,"tag":1260,"props":7130,"children":7132},{"id":7131},"key-features-of-php",[7133],{"type":27,"value":7134},"Key Features of PHP",{"type":21,"tag":1318,"props":7136,"children":7137},{},[7138,7148,7158,7168,7178],{"type":21,"tag":1322,"props":7139,"children":7140},{},[7141,7146],{"type":21,"tag":2808,"props":7142,"children":7143},{},[7144],{"type":27,"value":7145},"Server-Side Scripting",{"type":27,"value":7147},": PHP is executed on the server, allowing developers to create dynamic web pages that can interact with databases and handle user input.",{"type":21,"tag":1322,"props":7149,"children":7150},{},[7151,7156],{"type":21,"tag":2808,"props":7152,"children":7153},{},[7154],{"type":27,"value":7155},"Cross-Platform Compatibility",{"type":27,"value":7157},": PHP can run on various operating systems, including Windows, Linux, and macOS, making it a versatile choice for web development.",{"type":21,"tag":1322,"props":7159,"children":7160},{},[7161,7166],{"type":21,"tag":2808,"props":7162,"children":7163},{},[7164],{"type":27,"value":7165},"Wide Database Support",{"type":27,"value":7167},": PHP supports a wide range of databases, including MySQL, PostgreSQL, SQLite, and more, allowing developers to easily manage data in their applications.",{"type":21,"tag":1322,"props":7169,"children":7170},{},[7171,7176],{"type":21,"tag":2808,"props":7172,"children":7173},{},[7174],{"type":27,"value":7175},"Large Community and Ecosystem",{"type":27,"value":7177},": PHP has a large and active community that contributes to a vast ecosystem of libraries, frameworks, and tools, making it easier for developers to build robust applications.",{"type":21,"tag":1322,"props":7179,"children":7180},{},[7181,7186],{"type":21,"tag":2808,"props":7182,"children":7183},{},[7184],{"type":27,"value":7185},"Easy to Learn",{"type":27,"value":7187},": PHP has a simple syntax that is easy for beginners to grasp, making it an excellent choice for those new to programming.",{"type":21,"tag":1260,"props":7189,"children":7191},{"id":7190},"common-use-cases-for-php",[7192],{"type":27,"value":7193},"Common Use Cases for PHP",{"type":21,"tag":1318,"props":7195,"children":7196},{},[7197,7207,7217,7227],{"type":21,"tag":1322,"props":7198,"children":7199},{},[7200,7205],{"type":21,"tag":2808,"props":7201,"children":7202},{},[7203],{"type":27,"value":7204},"Web Development",{"type":27,"value":7206},": PHP is primarily used for building dynamic websites and web applications. It can be embedded directly into HTML, making it easy to create interactive and dynamic web pages.",{"type":21,"tag":1322,"props":7208,"children":7209},{},[7210,7215],{"type":21,"tag":2808,"props":7211,"children":7212},{},[7213],{"type":27,"value":7214},"Content Management Systems (CMS)",{"type":27,"value":7216},": Many popular CMS platforms, such as WordPress, Joomla, and Drupal, are built using PHP, allowing users to create and manage websites without extensive coding knowledge.",{"type":21,"tag":1322,"props":7218,"children":7219},{},[7220,7225],{"type":21,"tag":2808,"props":7221,"children":7222},{},[7223],{"type":27,"value":7224},"E-commerce Platforms",{"type":27,"value":7226},": PHP is commonly used to develop e-commerce platforms like Magento and WooCommerce, providing robust solutions for online stores.",{"type":21,"tag":1322,"props":7228,"children":7229},{},[7230,7235],{"type":21,"tag":2808,"props":7231,"children":7232},{},[7233],{"type":27,"value":7234},"API Development",{"type":27,"value":7236},": PHP can be used to create RESTful APIs that allow different applications to communicate with each other, making it a popular choice for backend development.",{"type":21,"tag":1260,"props":7238,"children":7239},{"id":1596},[7240],{"type":27,"value":1599},{"type":21,"tag":30,"props":7242,"children":7243},{},[7244],{"type":27,"value":7245},"PHP is a powerful and versatile language that continues to be a popular choice for web development. Its ease of use, wide range of features, and strong community support make it an excellent option for both beginners and experienced developers looking to build dynamic web applications. Whether you're creating a simple website or a complex web application, PHP provides the tools and capabilities needed to bring your ideas to life.",{"title":8,"searchDepth":132,"depth":132,"links":7247},[7248],{"id":7120,"depth":75,"text":7123,"children":7249},[7250,7251,7252],{"id":7131,"depth":132,"text":7134},{"id":7190,"depth":132,"text":7193},{"id":1596,"depth":132,"text":1599},"content:php:php-fundamental:introduction.md","php\u002Fphp-fundamental\u002Fintroduction.md","php\u002Fphp-fundamental\u002Fintroduction",{"_path":7257,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":7258,"description":7259,"tags":7260,"date":15,"weight":197,"body":7262,"_type":1234,"_id":9263,"_source":1236,"_file":9264,"_stem":9265,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Foperator","PHP Operators","Essential PHP operators and their usage",[12,13,7261],"operators",{"type":18,"children":7263,"toc":9257},[7264,7269,7274,7765,7769,8847,8852,8857,9141,9146,9248,9253],{"type":21,"tag":22,"props":7265,"children":7266},{"id":7261},[7267],{"type":27,"value":7268},"Operators",{"type":21,"tag":30,"props":7270,"children":7271},{},[7272],{"type":27,"value":7273},"In PHP, operators are symbols that perform operations on variables and values. They can be categorized into several types:",{"type":21,"tag":1959,"props":7275,"children":7276},{},[7277,7296],{"type":21,"tag":1963,"props":7278,"children":7279},{},[7280],{"type":21,"tag":1967,"props":7281,"children":7282},{},[7283,7287,7291],{"type":21,"tag":1971,"props":7284,"children":7285},{},[7286],{"type":27,"value":1975},{"type":21,"tag":1971,"props":7288,"children":7289},{},[7290],{"type":27,"value":1980},{"type":21,"tag":1971,"props":7292,"children":7293},{},[7294],{"type":27,"value":7295},"Keywords",{"type":21,"tag":1982,"props":7297,"children":7298},{},[7299,7345,7401,7466,7490,7518,7539,7584,7606,7624,7646,7703,7725,7747],{"type":21,"tag":1967,"props":7300,"children":7301},{},[7302,7307,7312],{"type":21,"tag":1989,"props":7303,"children":7304},{},[7305],{"type":27,"value":7306},"Arithmetic Operators",{"type":21,"tag":1989,"props":7308,"children":7309},{},[7310],{"type":27,"value":7311},"Perform basic mathematical operations",{"type":21,"tag":1989,"props":7313,"children":7314},{},[7315,7320,7321,7326,7327,7332,7333,7339,7340],{"type":21,"tag":36,"props":7316,"children":7318},{"className":7317},[],[7319],{"type":27,"value":826},{"type":27,"value":110},{"type":21,"tag":36,"props":7322,"children":7324},{"className":7323},[],[7325],{"type":27,"value":1086},{"type":27,"value":110},{"type":21,"tag":36,"props":7328,"children":7330},{"className":7329},[],[7331],{"type":27,"value":6076},{"type":27,"value":110},{"type":21,"tag":36,"props":7334,"children":7336},{"className":7335},[],[7337],{"type":27,"value":7338},"\u002F",{"type":27,"value":110},{"type":21,"tag":36,"props":7341,"children":7343},{"className":7342},[],[7344],{"type":27,"value":581},{"type":21,"tag":1967,"props":7346,"children":7347},{},[7348,7353,7358],{"type":21,"tag":1989,"props":7349,"children":7350},{},[7351],{"type":27,"value":7352},"Assignment Operators",{"type":21,"tag":1989,"props":7354,"children":7355},{},[7356],{"type":27,"value":7357},"Assign values to variables",{"type":21,"tag":1989,"props":7359,"children":7360},{},[7361,7366,7367,7373,7374,7380,7381,7387,7388,7394,7395],{"type":21,"tag":36,"props":7362,"children":7364},{"className":7363},[],[7365],{"type":27,"value":88},{"type":27,"value":110},{"type":21,"tag":36,"props":7368,"children":7370},{"className":7369},[],[7371],{"type":27,"value":7372},"+=",{"type":27,"value":110},{"type":21,"tag":36,"props":7375,"children":7377},{"className":7376},[],[7378],{"type":27,"value":7379},"-=",{"type":27,"value":110},{"type":21,"tag":36,"props":7382,"children":7384},{"className":7383},[],[7385],{"type":27,"value":7386},"*=",{"type":27,"value":110},{"type":21,"tag":36,"props":7389,"children":7391},{"className":7390},[],[7392],{"type":27,"value":7393},"\u002F=",{"type":27,"value":110},{"type":21,"tag":36,"props":7396,"children":7398},{"className":7397},[],[7399],{"type":27,"value":7400},"%=",{"type":21,"tag":1967,"props":7402,"children":7403},{},[7404,7409,7414],{"type":21,"tag":1989,"props":7405,"children":7406},{},[7407],{"type":27,"value":7408},"Comparison Operators",{"type":21,"tag":1989,"props":7410,"children":7411},{},[7412],{"type":27,"value":7413},"Compare two values",{"type":21,"tag":1989,"props":7415,"children":7416},{},[7417,7422,7423,7428,7429,7435,7436,7442,7443,7448,7449,7454,7455,7460,7461],{"type":21,"tag":36,"props":7418,"children":7420},{"className":7419},[],[7421],{"type":27,"value":5173},{"type":27,"value":110},{"type":21,"tag":36,"props":7424,"children":7426},{"className":7425},[],[7427],{"type":27,"value":3913},{"type":27,"value":110},{"type":21,"tag":36,"props":7430,"children":7432},{"className":7431},[],[7433],{"type":27,"value":7434},"!=",{"type":27,"value":110},{"type":21,"tag":36,"props":7437,"children":7439},{"className":7438},[],[7440],{"type":27,"value":7441},"!==",{"type":27,"value":110},{"type":21,"tag":36,"props":7444,"children":7446},{"className":7445},[],[7447],{"type":27,"value":3992},{"type":27,"value":110},{"type":21,"tag":36,"props":7450,"children":7452},{"className":7451},[],[7453],{"type":27,"value":6629},{"type":27,"value":110},{"type":21,"tag":36,"props":7456,"children":7458},{"className":7457},[],[7459],{"type":27,"value":6028},{"type":27,"value":110},{"type":21,"tag":36,"props":7462,"children":7464},{"className":7463},[],[7465],{"type":27,"value":4437},{"type":21,"tag":1967,"props":7467,"children":7468},{},[7469,7474,7479],{"type":21,"tag":1989,"props":7470,"children":7471},{},[7472],{"type":27,"value":7473},"Logical Operators",{"type":21,"tag":1989,"props":7475,"children":7476},{},[7477],{"type":27,"value":7478},"Combine conditional statements",{"type":21,"tag":1989,"props":7480,"children":7481},{},[7482,7488],{"type":21,"tag":36,"props":7483,"children":7485},{"className":7484},[],[7486],{"type":27,"value":7487},"&&",{"type":27,"value":7489},", `",{"type":21,"tag":1967,"props":7491,"children":7492},{},[7493,7498,7503],{"type":21,"tag":1989,"props":7494,"children":7495},{},[7496],{"type":27,"value":7497},"Increment\u002FDecrement Operators",{"type":21,"tag":1989,"props":7499,"children":7500},{},[7501],{"type":27,"value":7502},"Increase or decrease a variable's value by one",{"type":21,"tag":1989,"props":7504,"children":7505},{},[7506,7511,7512],{"type":21,"tag":36,"props":7507,"children":7509},{"className":7508},[],[7510],{"type":27,"value":4006},{"type":27,"value":110},{"type":21,"tag":36,"props":7513,"children":7515},{"className":7514},[],[7516],{"type":27,"value":7517},"--",{"type":21,"tag":1967,"props":7519,"children":7520},{},[7521,7526,7531],{"type":21,"tag":1989,"props":7522,"children":7523},{},[7524],{"type":27,"value":7525},"String Operators",{"type":21,"tag":1989,"props":7527,"children":7528},{},[7529],{"type":27,"value":7530},"Concatenate strings",{"type":21,"tag":1989,"props":7532,"children":7533},{},[7534],{"type":21,"tag":36,"props":7535,"children":7537},{"className":7536},[],[7538],{"type":27,"value":1426},{"type":21,"tag":1967,"props":7540,"children":7541},{},[7542,7547,7552],{"type":21,"tag":1989,"props":7543,"children":7544},{},[7545],{"type":27,"value":7546},"Array Operators",{"type":21,"tag":1989,"props":7548,"children":7549},{},[7550],{"type":27,"value":7551},"Perform operations on arrays",{"type":21,"tag":1989,"props":7553,"children":7554},{},[7555,7560,7561,7566,7567,7572,7573,7578,7579],{"type":21,"tag":36,"props":7556,"children":7558},{"className":7557},[],[7559],{"type":27,"value":826},{"type":27,"value":110},{"type":21,"tag":36,"props":7562,"children":7564},{"className":7563},[],[7565],{"type":27,"value":5173},{"type":27,"value":110},{"type":21,"tag":36,"props":7568,"children":7570},{"className":7569},[],[7571],{"type":27,"value":3913},{"type":27,"value":110},{"type":21,"tag":36,"props":7574,"children":7576},{"className":7575},[],[7577],{"type":27,"value":7434},{"type":27,"value":110},{"type":21,"tag":36,"props":7580,"children":7582},{"className":7581},[],[7583],{"type":27,"value":7441},{"type":21,"tag":1967,"props":7585,"children":7586},{},[7587,7592,7597],{"type":21,"tag":1989,"props":7588,"children":7589},{},[7590],{"type":27,"value":7591},"Error Control Operators",{"type":21,"tag":1989,"props":7593,"children":7594},{},[7595],{"type":27,"value":7596},"Suppress error messages",{"type":21,"tag":1989,"props":7598,"children":7599},{},[7600],{"type":21,"tag":36,"props":7601,"children":7603},{"className":7602},[],[7604],{"type":27,"value":7605},"@",{"type":21,"tag":1967,"props":7607,"children":7608},{},[7609,7614,7619],{"type":21,"tag":1989,"props":7610,"children":7611},{},[7612],{"type":27,"value":7613},"Execution Operators",{"type":21,"tag":1989,"props":7615,"children":7616},{},[7617],{"type":27,"value":7618},"Execute external programs",{"type":21,"tag":1989,"props":7620,"children":7621},{},[7622],{"type":27,"value":7623},"` (backticks)",{"type":21,"tag":1967,"props":7625,"children":7626},{},[7627,7632,7637],{"type":21,"tag":1989,"props":7628,"children":7629},{},[7630],{"type":27,"value":7631},"Type Operators",{"type":21,"tag":1989,"props":7633,"children":7634},{},[7635],{"type":27,"value":7636},"Check the type of a variable",{"type":21,"tag":1989,"props":7638,"children":7639},{},[7640],{"type":21,"tag":36,"props":7641,"children":7643},{"className":7642},[],[7644],{"type":27,"value":7645},"instanceof",{"type":21,"tag":1967,"props":7647,"children":7648},{},[7649,7654,7659],{"type":21,"tag":1989,"props":7650,"children":7651},{},[7652],{"type":27,"value":7653},"Bitwise Operators",{"type":21,"tag":1989,"props":7655,"children":7656},{},[7657],{"type":27,"value":7658},"Perform bitwise operations",{"type":21,"tag":1989,"props":7660,"children":7661},{},[7662,7668,7669,7675,7676,7682,7683,7689,7690,7696,7697],{"type":21,"tag":36,"props":7663,"children":7665},{"className":7664},[],[7666],{"type":27,"value":7667},"&",{"type":27,"value":110},{"type":21,"tag":36,"props":7670,"children":7672},{"className":7671},[],[7673],{"type":27,"value":7674},"|",{"type":27,"value":110},{"type":21,"tag":36,"props":7677,"children":7679},{"className":7678},[],[7680],{"type":27,"value":7681},"^",{"type":27,"value":110},{"type":21,"tag":36,"props":7684,"children":7686},{"className":7685},[],[7687],{"type":27,"value":7688},"~",{"type":27,"value":110},{"type":21,"tag":36,"props":7691,"children":7693},{"className":7692},[],[7694],{"type":27,"value":7695},"\u003C\u003C",{"type":27,"value":110},{"type":21,"tag":36,"props":7698,"children":7700},{"className":7699},[],[7701],{"type":27,"value":7702},">>",{"type":21,"tag":1967,"props":7704,"children":7705},{},[7706,7711,7716],{"type":21,"tag":1989,"props":7707,"children":7708},{},[7709],{"type":27,"value":7710},"Ternary Operator",{"type":21,"tag":1989,"props":7712,"children":7713},{},[7714],{"type":27,"value":7715},"A shorthand for an if-else statement",{"type":21,"tag":1989,"props":7717,"children":7718},{},[7719],{"type":21,"tag":36,"props":7720,"children":7722},{"className":7721},[],[7723],{"type":27,"value":7724},"? :",{"type":21,"tag":1967,"props":7726,"children":7727},{},[7728,7733,7738],{"type":21,"tag":1989,"props":7729,"children":7730},{},[7731],{"type":27,"value":7732},"Null Coalescing Operator",{"type":21,"tag":1989,"props":7734,"children":7735},{},[7736],{"type":27,"value":7737},"Return the first operand if it exists and is not null, otherwise return the second operand",{"type":21,"tag":1989,"props":7739,"children":7740},{},[7741],{"type":21,"tag":36,"props":7742,"children":7744},{"className":7743},[],[7745],{"type":27,"value":7746},"??",{"type":21,"tag":1967,"props":7748,"children":7749},{},[7750,7755,7760],{"type":21,"tag":1989,"props":7751,"children":7752},{},[7753],{"type":27,"value":7754},"Operator Precedence",{"type":21,"tag":1989,"props":7756,"children":7757},{},[7758],{"type":27,"value":7759},"Determines the order of evaluation in expressions",{"type":21,"tag":1989,"props":7761,"children":7762},{},[7763],{"type":27,"value":7764},"N\u002FA",{"type":21,"tag":1260,"props":7766,"children":7767},{"id":2131},[7768],{"type":27,"value":2134},{"type":21,"tag":53,"props":7770,"children":7772},{"className":55,"code":7771,"language":12,"meta":8,"style":8},"$a = 10;\n$b = 5;\n\n\u002F\u002F Arithmetic Operators\necho $a + $b; \u002F\u002F 15\n\n\u002F\u002F Assignment Operators\n$a += $b; \u002F\u002F $a is now 15\n\n\u002F\u002F Comparison Operators\nif ($a > $b) {\n    echo \"$a is greater than $b\";\n}\n\n\u002F\u002F Logical Operators\nif ($a > 10 && $b \u003C 10) {\n    echo \"Both conditions are true\";\n}\n\n\u002F\u002F Increment\u002FDecrement Operators\n$a++; \u002F\u002F $a is now 16\n$b--; \u002F\u002F $b is now 4\n\n\u002F\u002F String Operators\n$str1 = \"Hello, \";\n$str2 = \"World!\";\necho $str1 . $str2; \u002F\u002F \"Hello, World!\"\n\n\u002F\u002F Array Operators\n$array1 = [1, 2, 3];\n$array2 = [4, 5, 6];\n$result = $array1 + $array2; \u002F\u002F [1, 2, 3, 4, 5, 6]\n\n\u002F\u002F Error Control Operators\n$result = @file_get_contents('nonexistentfile.txt'); \u002F\u002F Suppresses error message\n\n\u002F\u002F Execution Operators\n$output = `ls -l`; \u002F\u002F Executes the command and stores the output\n\n\u002F\u002F Type Operators\nclass MyClass {}\n$obj = new MyClass();\nif ($obj instanceof MyClass) {\n    echo \"The object is an instance of MyClass\";\n}\n\n\u002F\u002F Bitwise Operators\n$x = 5; \u002F\u002F 0101 in binary\n$y = 3; \u002F\u002F 0011 in binary\necho $x & $y; \u002F\u002F 1 (0001 in binary)\necho $x | $y; \u002F\u002F 7 (0111 in binary)\necho $x ^ $y; \u002F\u002F 6 (0110 in binary)\n\n\u002F\u002F Ternary Operator\n$age = 20;\n$status = ($age >= 18) ? \"Adult\" : \"Minor\";\necho $status; \u002F\u002F \"Adult\"\n\n\u002F\u002F Null Coalescing Operator\n$username = $_GET['username'] ?? 'Guest';\necho $username; \u002F\u002F Outputs the username if it exists, otherwise \"Guest\"\n",[7773],{"type":21,"tag":36,"props":7774,"children":7775},{"__ignoreMap":8},[7776,7796,7816,7823,7831,7855,7862,7870,7890,7897,7905,7925,7960,7967,7974,7982,8022,8038,8045,8052,8060,8080,8100,8107,8115,8135,8156,8182,8189,8197,8238,8279,8310,8318,8327,8367,8375,8384,8411,8419,8428,8445,8470,8495,8512,8520,8528,8537,8563,8589,8616,8641,8666,8674,8683,8703,8754,8772,8780,8789,8829],{"type":21,"tag":62,"props":7777,"children":7778},{"class":64,"line":65},[7779,7784,7788,7792],{"type":21,"tag":62,"props":7780,"children":7781},{"style":79},[7782],{"type":27,"value":7783},"$a ",{"type":21,"tag":62,"props":7785,"children":7786},{"style":85},[7787],{"type":27,"value":88},{"type":21,"tag":62,"props":7789,"children":7790},{"style":91},[7791],{"type":27,"value":5144},{"type":21,"tag":62,"props":7793,"children":7794},{"style":79},[7795],{"type":27,"value":1455},{"type":21,"tag":62,"props":7797,"children":7798},{"class":64,"line":75},[7799,7804,7808,7812],{"type":21,"tag":62,"props":7800,"children":7801},{"style":79},[7802],{"type":27,"value":7803},"$b ",{"type":21,"tag":62,"props":7805,"children":7806},{"style":85},[7807],{"type":27,"value":88},{"type":21,"tag":62,"props":7809,"children":7810},{"style":91},[7811],{"type":27,"value":1566},{"type":21,"tag":62,"props":7813,"children":7814},{"style":79},[7815],{"type":27,"value":1455},{"type":21,"tag":62,"props":7817,"children":7818},{"class":64,"line":132},[7819],{"type":21,"tag":62,"props":7820,"children":7821},{"emptyLinePlaceholder":136},[7822],{"type":27,"value":139},{"type":21,"tag":62,"props":7824,"children":7825},{"class":64,"line":142},[7826],{"type":21,"tag":62,"props":7827,"children":7828},{"style":69},[7829],{"type":27,"value":7830},"\u002F\u002F Arithmetic Operators\n",{"type":21,"tag":62,"props":7832,"children":7833},{"class":64,"line":151},[7834,7838,7842,7846,7850],{"type":21,"tag":62,"props":7835,"children":7836},{"style":91},[7837],{"type":27,"value":1008},{"type":21,"tag":62,"props":7839,"children":7840},{"style":79},[7841],{"type":27,"value":5398},{"type":21,"tag":62,"props":7843,"children":7844},{"style":85},[7845],{"type":27,"value":826},{"type":21,"tag":62,"props":7847,"children":7848},{"style":79},[7849],{"type":27,"value":5407},{"type":21,"tag":62,"props":7851,"children":7852},{"style":69},[7853],{"type":27,"value":7854},"\u002F\u002F 15\n",{"type":21,"tag":62,"props":7856,"children":7857},{"class":64,"line":173},[7858],{"type":21,"tag":62,"props":7859,"children":7860},{"emptyLinePlaceholder":136},[7861],{"type":27,"value":139},{"type":21,"tag":62,"props":7863,"children":7864},{"class":64,"line":197},[7865],{"type":21,"tag":62,"props":7866,"children":7867},{"style":69},[7868],{"type":27,"value":7869},"\u002F\u002F Assignment Operators\n",{"type":21,"tag":62,"props":7871,"children":7872},{"class":64,"line":219},[7873,7877,7881,7885],{"type":21,"tag":62,"props":7874,"children":7875},{"style":79},[7876],{"type":27,"value":7783},{"type":21,"tag":62,"props":7878,"children":7879},{"style":85},[7880],{"type":27,"value":7372},{"type":21,"tag":62,"props":7882,"children":7883},{"style":79},[7884],{"type":27,"value":5407},{"type":21,"tag":62,"props":7886,"children":7887},{"style":69},[7888],{"type":27,"value":7889},"\u002F\u002F $a is now 15\n",{"type":21,"tag":62,"props":7891,"children":7892},{"class":64,"line":16},[7893],{"type":21,"tag":62,"props":7894,"children":7895},{"emptyLinePlaceholder":136},[7896],{"type":27,"value":139},{"type":21,"tag":62,"props":7898,"children":7899},{"class":64,"line":244},[7900],{"type":21,"tag":62,"props":7901,"children":7902},{"style":69},[7903],{"type":27,"value":7904},"\u002F\u002F Comparison Operators\n",{"type":21,"tag":62,"props":7906,"children":7907},{"class":64,"line":252},[7908,7912,7916,7920],{"type":21,"tag":62,"props":7909,"children":7910},{"style":85},[7911],{"type":27,"value":3903},{"type":21,"tag":62,"props":7913,"children":7914},{"style":79},[7915],{"type":27,"value":6594},{"type":21,"tag":62,"props":7917,"children":7918},{"style":85},[7919],{"type":27,"value":6629},{"type":21,"tag":62,"props":7921,"children":7922},{"style":79},[7923],{"type":27,"value":7924}," $b) {\n",{"type":21,"tag":62,"props":7926,"children":7927},{"class":64,"line":261},[7928,7932,7937,7942,7947,7952,7956],{"type":21,"tag":62,"props":7929,"children":7930},{"style":91},[7931],{"type":27,"value":3930},{"type":21,"tag":62,"props":7933,"children":7934},{"style":102},[7935],{"type":27,"value":7936}," \"",{"type":21,"tag":62,"props":7938,"children":7939},{"style":79},[7940],{"type":27,"value":7941},"$a",{"type":21,"tag":62,"props":7943,"children":7944},{"style":102},[7945],{"type":27,"value":7946}," is greater than ",{"type":21,"tag":62,"props":7948,"children":7949},{"style":79},[7950],{"type":27,"value":7951},"$b",{"type":21,"tag":62,"props":7953,"children":7954},{"style":102},[7955],{"type":27,"value":2388},{"type":21,"tag":62,"props":7957,"children":7958},{"style":79},[7959],{"type":27,"value":1455},{"type":21,"tag":62,"props":7961,"children":7962},{"class":64,"line":4899},[7963],{"type":21,"tag":62,"props":7964,"children":7965},{"style":79},[7966],{"type":27,"value":960},{"type":21,"tag":62,"props":7968,"children":7969},{"class":64,"line":4920},[7970],{"type":21,"tag":62,"props":7971,"children":7972},{"emptyLinePlaceholder":136},[7973],{"type":27,"value":139},{"type":21,"tag":62,"props":7975,"children":7976},{"class":64,"line":4945},[7977],{"type":21,"tag":62,"props":7978,"children":7979},{"style":69},[7980],{"type":27,"value":7981},"\u002F\u002F Logical Operators\n",{"type":21,"tag":62,"props":7983,"children":7984},{"class":64,"line":4958},[7985,7989,7993,7997,8001,8005,8010,8014,8018],{"type":21,"tag":62,"props":7986,"children":7987},{"style":85},[7988],{"type":27,"value":3903},{"type":21,"tag":62,"props":7990,"children":7991},{"style":79},[7992],{"type":27,"value":6594},{"type":21,"tag":62,"props":7994,"children":7995},{"style":85},[7996],{"type":27,"value":6629},{"type":21,"tag":62,"props":7998,"children":7999},{"style":91},[8000],{"type":27,"value":5144},{"type":21,"tag":62,"props":8002,"children":8003},{"style":85},[8004],{"type":27,"value":4446},{"type":21,"tag":62,"props":8006,"children":8007},{"style":79},[8008],{"type":27,"value":8009}," $b ",{"type":21,"tag":62,"props":8011,"children":8012},{"style":85},[8013],{"type":27,"value":3992},{"type":21,"tag":62,"props":8015,"children":8016},{"style":91},[8017],{"type":27,"value":5144},{"type":21,"tag":62,"props":8019,"children":8020},{"style":79},[8021],{"type":27,"value":3922},{"type":21,"tag":62,"props":8023,"children":8024},{"class":64,"line":4975},[8025,8029,8034],{"type":21,"tag":62,"props":8026,"children":8027},{"style":91},[8028],{"type":27,"value":3930},{"type":21,"tag":62,"props":8030,"children":8031},{"style":102},[8032],{"type":27,"value":8033}," \"Both conditions are true\"",{"type":21,"tag":62,"props":8035,"children":8036},{"style":79},[8037],{"type":27,"value":1455},{"type":21,"tag":62,"props":8039,"children":8040},{"class":64,"line":4983},[8041],{"type":21,"tag":62,"props":8042,"children":8043},{"style":79},[8044],{"type":27,"value":960},{"type":21,"tag":62,"props":8046,"children":8047},{"class":64,"line":4991},[8048],{"type":21,"tag":62,"props":8049,"children":8050},{"emptyLinePlaceholder":136},[8051],{"type":27,"value":139},{"type":21,"tag":62,"props":8053,"children":8054},{"class":64,"line":5000},[8055],{"type":21,"tag":62,"props":8056,"children":8057},{"style":69},[8058],{"type":27,"value":8059},"\u002F\u002F Increment\u002FDecrement Operators\n",{"type":21,"tag":62,"props":8061,"children":8062},{"class":64,"line":5020},[8063,8067,8071,8075],{"type":21,"tag":62,"props":8064,"children":8065},{"style":79},[8066],{"type":27,"value":7941},{"type":21,"tag":62,"props":8068,"children":8069},{"style":85},[8070],{"type":27,"value":4006},{"type":21,"tag":62,"props":8072,"children":8073},{"style":79},[8074],{"type":27,"value":1571},{"type":21,"tag":62,"props":8076,"children":8077},{"style":69},[8078],{"type":27,"value":8079},"\u002F\u002F $a is now 16\n",{"type":21,"tag":62,"props":8081,"children":8082},{"class":64,"line":5033},[8083,8087,8091,8095],{"type":21,"tag":62,"props":8084,"children":8085},{"style":79},[8086],{"type":27,"value":7951},{"type":21,"tag":62,"props":8088,"children":8089},{"style":85},[8090],{"type":27,"value":7517},{"type":21,"tag":62,"props":8092,"children":8093},{"style":79},[8094],{"type":27,"value":1571},{"type":21,"tag":62,"props":8096,"children":8097},{"style":69},[8098],{"type":27,"value":8099},"\u002F\u002F $b is now 4\n",{"type":21,"tag":62,"props":8101,"children":8102},{"class":64,"line":5045},[8103],{"type":21,"tag":62,"props":8104,"children":8105},{"emptyLinePlaceholder":136},[8106],{"type":27,"value":139},{"type":21,"tag":62,"props":8108,"children":8109},{"class":64,"line":5061},[8110],{"type":21,"tag":62,"props":8111,"children":8112},{"style":69},[8113],{"type":27,"value":8114},"\u002F\u002F String Operators\n",{"type":21,"tag":62,"props":8116,"children":8117},{"class":64,"line":5489},[8118,8123,8127,8131],{"type":21,"tag":62,"props":8119,"children":8120},{"style":79},[8121],{"type":27,"value":8122},"$str1 ",{"type":21,"tag":62,"props":8124,"children":8125},{"style":85},[8126],{"type":27,"value":88},{"type":21,"tag":62,"props":8128,"children":8129},{"style":102},[8130],{"type":27,"value":1888},{"type":21,"tag":62,"props":8132,"children":8133},{"style":79},[8134],{"type":27,"value":1455},{"type":21,"tag":62,"props":8136,"children":8137},{"class":64,"line":5506},[8138,8143,8147,8152],{"type":21,"tag":62,"props":8139,"children":8140},{"style":79},[8141],{"type":27,"value":8142},"$str2 ",{"type":21,"tag":62,"props":8144,"children":8145},{"style":85},[8146],{"type":27,"value":88},{"type":21,"tag":62,"props":8148,"children":8149},{"style":102},[8150],{"type":27,"value":8151}," \"World!\"",{"type":21,"tag":62,"props":8153,"children":8154},{"style":79},[8155],{"type":27,"value":1455},{"type":21,"tag":62,"props":8157,"children":8158},{"class":64,"line":5519},[8159,8163,8168,8172,8177],{"type":21,"tag":62,"props":8160,"children":8161},{"style":91},[8162],{"type":27,"value":1008},{"type":21,"tag":62,"props":8164,"children":8165},{"style":79},[8166],{"type":27,"value":8167}," $str1 ",{"type":21,"tag":62,"props":8169,"children":8170},{"style":85},[8171],{"type":27,"value":1426},{"type":21,"tag":62,"props":8173,"children":8174},{"style":79},[8175],{"type":27,"value":8176}," $str2; ",{"type":21,"tag":62,"props":8178,"children":8179},{"style":69},[8180],{"type":27,"value":8181},"\u002F\u002F \"Hello, World!\"\n",{"type":21,"tag":62,"props":8183,"children":8184},{"class":64,"line":5536},[8185],{"type":21,"tag":62,"props":8186,"children":8187},{"emptyLinePlaceholder":136},[8188],{"type":27,"value":139},{"type":21,"tag":62,"props":8190,"children":8191},{"class":64,"line":5545},[8192],{"type":21,"tag":62,"props":8193,"children":8194},{"style":69},[8195],{"type":27,"value":8196},"\u002F\u002F Array Operators\n",{"type":21,"tag":62,"props":8198,"children":8200},{"class":64,"line":8199},30,[8201,8206,8210,8214,8218,8222,8226,8230,8234],{"type":21,"tag":62,"props":8202,"children":8203},{"style":79},[8204],{"type":27,"value":8205},"$array1 ",{"type":21,"tag":62,"props":8207,"children":8208},{"style":85},[8209],{"type":27,"value":88},{"type":21,"tag":62,"props":8211,"children":8212},{"style":79},[8213],{"type":27,"value":276},{"type":21,"tag":62,"props":8215,"children":8216},{"style":91},[8217],{"type":27,"value":281},{"type":21,"tag":62,"props":8219,"children":8220},{"style":79},[8221],{"type":27,"value":110},{"type":21,"tag":62,"props":8223,"children":8224},{"style":91},[8225],{"type":27,"value":290},{"type":21,"tag":62,"props":8227,"children":8228},{"style":79},[8229],{"type":27,"value":110},{"type":21,"tag":62,"props":8231,"children":8232},{"style":91},[8233],{"type":27,"value":299},{"type":21,"tag":62,"props":8235,"children":8236},{"style":79},[8237],{"type":27,"value":322},{"type":21,"tag":62,"props":8239,"children":8241},{"class":64,"line":8240},31,[8242,8247,8251,8255,8259,8263,8267,8271,8275],{"type":21,"tag":62,"props":8243,"children":8244},{"style":79},[8245],{"type":27,"value":8246},"$array2 ",{"type":21,"tag":62,"props":8248,"children":8249},{"style":85},[8250],{"type":27,"value":88},{"type":21,"tag":62,"props":8252,"children":8253},{"style":79},[8254],{"type":27,"value":276},{"type":21,"tag":62,"props":8256,"children":8257},{"style":91},[8258],{"type":27,"value":308},{"type":21,"tag":62,"props":8260,"children":8261},{"style":79},[8262],{"type":27,"value":110},{"type":21,"tag":62,"props":8264,"children":8265},{"style":91},[8266],{"type":27,"value":317},{"type":21,"tag":62,"props":8268,"children":8269},{"style":79},[8270],{"type":27,"value":110},{"type":21,"tag":62,"props":8272,"children":8273},{"style":91},[8274],{"type":27,"value":542},{"type":21,"tag":62,"props":8276,"children":8277},{"style":79},[8278],{"type":27,"value":322},{"type":21,"tag":62,"props":8280,"children":8282},{"class":64,"line":8281},32,[8283,8287,8291,8296,8300,8305],{"type":21,"tag":62,"props":8284,"children":8285},{"style":79},[8286],{"type":27,"value":1548},{"type":21,"tag":62,"props":8288,"children":8289},{"style":85},[8290],{"type":27,"value":88},{"type":21,"tag":62,"props":8292,"children":8293},{"style":79},[8294],{"type":27,"value":8295}," $array1 ",{"type":21,"tag":62,"props":8297,"children":8298},{"style":85},[8299],{"type":27,"value":826},{"type":21,"tag":62,"props":8301,"children":8302},{"style":79},[8303],{"type":27,"value":8304}," $array2; ",{"type":21,"tag":62,"props":8306,"children":8307},{"style":69},[8308],{"type":27,"value":8309},"\u002F\u002F [1, 2, 3, 4, 5, 6]\n",{"type":21,"tag":62,"props":8311,"children":8313},{"class":64,"line":8312},33,[8314],{"type":21,"tag":62,"props":8315,"children":8316},{"emptyLinePlaceholder":136},[8317],{"type":27,"value":139},{"type":21,"tag":62,"props":8319,"children":8321},{"class":64,"line":8320},34,[8322],{"type":21,"tag":62,"props":8323,"children":8324},{"style":69},[8325],{"type":27,"value":8326},"\u002F\u002F Error Control Operators\n",{"type":21,"tag":62,"props":8328,"children":8330},{"class":64,"line":8329},35,[8331,8335,8339,8344,8349,8353,8358,8362],{"type":21,"tag":62,"props":8332,"children":8333},{"style":79},[8334],{"type":27,"value":1548},{"type":21,"tag":62,"props":8336,"children":8337},{"style":85},[8338],{"type":27,"value":88},{"type":21,"tag":62,"props":8340,"children":8341},{"style":85},[8342],{"type":27,"value":8343}," @",{"type":21,"tag":62,"props":8345,"children":8346},{"style":91},[8347],{"type":27,"value":8348},"file_get_contents",{"type":21,"tag":62,"props":8350,"children":8351},{"style":79},[8352],{"type":27,"value":99},{"type":21,"tag":62,"props":8354,"children":8355},{"style":102},[8356],{"type":27,"value":8357},"'nonexistentfile.txt'",{"type":21,"tag":62,"props":8359,"children":8360},{"style":79},[8361],{"type":27,"value":2738},{"type":21,"tag":62,"props":8363,"children":8364},{"style":69},[8365],{"type":27,"value":8366},"\u002F\u002F Suppresses error message\n",{"type":21,"tag":62,"props":8368,"children":8370},{"class":64,"line":8369},36,[8371],{"type":21,"tag":62,"props":8372,"children":8373},{"emptyLinePlaceholder":136},[8374],{"type":27,"value":139},{"type":21,"tag":62,"props":8376,"children":8378},{"class":64,"line":8377},37,[8379],{"type":21,"tag":62,"props":8380,"children":8381},{"style":69},[8382],{"type":27,"value":8383},"\u002F\u002F Execution Operators\n",{"type":21,"tag":62,"props":8385,"children":8387},{"class":64,"line":8386},38,[8388,8393,8397,8402,8406],{"type":21,"tag":62,"props":8389,"children":8390},{"style":79},[8391],{"type":27,"value":8392},"$output ",{"type":21,"tag":62,"props":8394,"children":8395},{"style":85},[8396],{"type":27,"value":88},{"type":21,"tag":62,"props":8398,"children":8399},{"style":102},[8400],{"type":27,"value":8401}," `ls -l`",{"type":21,"tag":62,"props":8403,"children":8404},{"style":79},[8405],{"type":27,"value":1571},{"type":21,"tag":62,"props":8407,"children":8408},{"style":69},[8409],{"type":27,"value":8410},"\u002F\u002F Executes the command and stores the output\n",{"type":21,"tag":62,"props":8412,"children":8414},{"class":64,"line":8413},39,[8415],{"type":21,"tag":62,"props":8416,"children":8417},{"emptyLinePlaceholder":136},[8418],{"type":27,"value":139},{"type":21,"tag":62,"props":8420,"children":8422},{"class":64,"line":8421},40,[8423],{"type":21,"tag":62,"props":8424,"children":8425},{"style":69},[8426],{"type":27,"value":8427},"\u002F\u002F Type Operators\n",{"type":21,"tag":62,"props":8429,"children":8431},{"class":64,"line":8430},41,[8432,8436,8440],{"type":21,"tag":62,"props":8433,"children":8434},{"style":85},[8435],{"type":27,"value":2273},{"type":21,"tag":62,"props":8437,"children":8438},{"style":894},[8439],{"type":27,"value":2278},{"type":21,"tag":62,"props":8441,"children":8442},{"style":79},[8443],{"type":27,"value":8444}," {}\n",{"type":21,"tag":62,"props":8446,"children":8448},{"class":64,"line":8447},42,[8449,8454,8458,8462,8466],{"type":21,"tag":62,"props":8450,"children":8451},{"style":79},[8452],{"type":27,"value":8453},"$obj ",{"type":21,"tag":62,"props":8455,"children":8456},{"style":85},[8457],{"type":27,"value":88},{"type":21,"tag":62,"props":8459,"children":8460},{"style":85},[8461],{"type":27,"value":2333},{"type":21,"tag":62,"props":8463,"children":8464},{"style":91},[8465],{"type":27,"value":2278},{"type":21,"tag":62,"props":8467,"children":8468},{"style":79},[8469],{"type":27,"value":2342},{"type":21,"tag":62,"props":8471,"children":8473},{"class":64,"line":8472},43,[8474,8478,8483,8487,8491],{"type":21,"tag":62,"props":8475,"children":8476},{"style":85},[8477],{"type":27,"value":3903},{"type":21,"tag":62,"props":8479,"children":8480},{"style":79},[8481],{"type":27,"value":8482}," ($obj ",{"type":21,"tag":62,"props":8484,"children":8485},{"style":85},[8486],{"type":27,"value":7645},{"type":21,"tag":62,"props":8488,"children":8489},{"style":91},[8490],{"type":27,"value":2278},{"type":21,"tag":62,"props":8492,"children":8493},{"style":79},[8494],{"type":27,"value":3922},{"type":21,"tag":62,"props":8496,"children":8498},{"class":64,"line":8497},44,[8499,8503,8508],{"type":21,"tag":62,"props":8500,"children":8501},{"style":91},[8502],{"type":27,"value":3930},{"type":21,"tag":62,"props":8504,"children":8505},{"style":102},[8506],{"type":27,"value":8507}," \"The object is an instance of MyClass\"",{"type":21,"tag":62,"props":8509,"children":8510},{"style":79},[8511],{"type":27,"value":1455},{"type":21,"tag":62,"props":8513,"children":8515},{"class":64,"line":8514},45,[8516],{"type":21,"tag":62,"props":8517,"children":8518},{"style":79},[8519],{"type":27,"value":960},{"type":21,"tag":62,"props":8521,"children":8523},{"class":64,"line":8522},46,[8524],{"type":21,"tag":62,"props":8525,"children":8526},{"emptyLinePlaceholder":136},[8527],{"type":27,"value":139},{"type":21,"tag":62,"props":8529,"children":8531},{"class":64,"line":8530},47,[8532],{"type":21,"tag":62,"props":8533,"children":8534},{"style":69},[8535],{"type":27,"value":8536},"\u002F\u002F Bitwise Operators\n",{"type":21,"tag":62,"props":8538,"children":8540},{"class":64,"line":8539},48,[8541,8546,8550,8554,8558],{"type":21,"tag":62,"props":8542,"children":8543},{"style":79},[8544],{"type":27,"value":8545},"$x ",{"type":21,"tag":62,"props":8547,"children":8548},{"style":85},[8549],{"type":27,"value":88},{"type":21,"tag":62,"props":8551,"children":8552},{"style":91},[8553],{"type":27,"value":1566},{"type":21,"tag":62,"props":8555,"children":8556},{"style":79},[8557],{"type":27,"value":1571},{"type":21,"tag":62,"props":8559,"children":8560},{"style":69},[8561],{"type":27,"value":8562},"\u002F\u002F 0101 in binary\n",{"type":21,"tag":62,"props":8564,"children":8566},{"class":64,"line":8565},49,[8567,8572,8576,8580,8584],{"type":21,"tag":62,"props":8568,"children":8569},{"style":79},[8570],{"type":27,"value":8571},"$y ",{"type":21,"tag":62,"props":8573,"children":8574},{"style":85},[8575],{"type":27,"value":88},{"type":21,"tag":62,"props":8577,"children":8578},{"style":91},[8579],{"type":27,"value":3740},{"type":21,"tag":62,"props":8581,"children":8582},{"style":79},[8583],{"type":27,"value":1571},{"type":21,"tag":62,"props":8585,"children":8586},{"style":69},[8587],{"type":27,"value":8588},"\u002F\u002F 0011 in binary\n",{"type":21,"tag":62,"props":8590,"children":8592},{"class":64,"line":8591},50,[8593,8597,8602,8606,8611],{"type":21,"tag":62,"props":8594,"children":8595},{"style":91},[8596],{"type":27,"value":1008},{"type":21,"tag":62,"props":8598,"children":8599},{"style":79},[8600],{"type":27,"value":8601}," $x ",{"type":21,"tag":62,"props":8603,"children":8604},{"style":85},[8605],{"type":27,"value":7667},{"type":21,"tag":62,"props":8607,"children":8608},{"style":79},[8609],{"type":27,"value":8610}," $y; ",{"type":21,"tag":62,"props":8612,"children":8613},{"style":69},[8614],{"type":27,"value":8615},"\u002F\u002F 1 (0001 in binary)\n",{"type":21,"tag":62,"props":8617,"children":8619},{"class":64,"line":8618},51,[8620,8624,8628,8632,8636],{"type":21,"tag":62,"props":8621,"children":8622},{"style":91},[8623],{"type":27,"value":1008},{"type":21,"tag":62,"props":8625,"children":8626},{"style":79},[8627],{"type":27,"value":8601},{"type":21,"tag":62,"props":8629,"children":8630},{"style":85},[8631],{"type":27,"value":7674},{"type":21,"tag":62,"props":8633,"children":8634},{"style":79},[8635],{"type":27,"value":8610},{"type":21,"tag":62,"props":8637,"children":8638},{"style":69},[8639],{"type":27,"value":8640},"\u002F\u002F 7 (0111 in binary)\n",{"type":21,"tag":62,"props":8642,"children":8644},{"class":64,"line":8643},52,[8645,8649,8653,8657,8661],{"type":21,"tag":62,"props":8646,"children":8647},{"style":91},[8648],{"type":27,"value":1008},{"type":21,"tag":62,"props":8650,"children":8651},{"style":79},[8652],{"type":27,"value":8601},{"type":21,"tag":62,"props":8654,"children":8655},{"style":85},[8656],{"type":27,"value":7681},{"type":21,"tag":62,"props":8658,"children":8659},{"style":79},[8660],{"type":27,"value":8610},{"type":21,"tag":62,"props":8662,"children":8663},{"style":69},[8664],{"type":27,"value":8665},"\u002F\u002F 6 (0110 in binary)\n",{"type":21,"tag":62,"props":8667,"children":8669},{"class":64,"line":8668},53,[8670],{"type":21,"tag":62,"props":8671,"children":8672},{"emptyLinePlaceholder":136},[8673],{"type":27,"value":139},{"type":21,"tag":62,"props":8675,"children":8677},{"class":64,"line":8676},54,[8678],{"type":21,"tag":62,"props":8679,"children":8680},{"style":69},[8681],{"type":27,"value":8682},"\u002F\u002F Ternary Operator\n",{"type":21,"tag":62,"props":8684,"children":8686},{"class":64,"line":8685},55,[8687,8691,8695,8699],{"type":21,"tag":62,"props":8688,"children":8689},{"style":79},[8690],{"type":27,"value":4362},{"type":21,"tag":62,"props":8692,"children":8693},{"style":85},[8694],{"type":27,"value":88},{"type":21,"tag":62,"props":8696,"children":8697},{"style":91},[8698],{"type":27,"value":4371},{"type":21,"tag":62,"props":8700,"children":8701},{"style":79},[8702],{"type":27,"value":1455},{"type":21,"tag":62,"props":8704,"children":8706},{"class":64,"line":8705},56,[8707,8712,8716,8720,8724,8728,8732,8736,8741,8745,8750],{"type":21,"tag":62,"props":8708,"children":8709},{"style":79},[8710],{"type":27,"value":8711},"$status ",{"type":21,"tag":62,"props":8713,"children":8714},{"style":85},[8715],{"type":27,"value":88},{"type":21,"tag":62,"props":8717,"children":8718},{"style":79},[8719],{"type":27,"value":4387},{"type":21,"tag":62,"props":8721,"children":8722},{"style":85},[8723],{"type":27,"value":4437},{"type":21,"tag":62,"props":8725,"children":8726},{"style":91},[8727],{"type":27,"value":4396},{"type":21,"tag":62,"props":8729,"children":8730},{"style":79},[8731],{"type":27,"value":3798},{"type":21,"tag":62,"props":8733,"children":8734},{"style":85},[8735],{"type":27,"value":6821},{"type":21,"tag":62,"props":8737,"children":8738},{"style":102},[8739],{"type":27,"value":8740}," \"Adult\"",{"type":21,"tag":62,"props":8742,"children":8743},{"style":85},[8744],{"type":27,"value":6831},{"type":21,"tag":62,"props":8746,"children":8747},{"style":102},[8748],{"type":27,"value":8749}," \"Minor\"",{"type":21,"tag":62,"props":8751,"children":8752},{"style":79},[8753],{"type":27,"value":1455},{"type":21,"tag":62,"props":8755,"children":8757},{"class":64,"line":8756},57,[8758,8762,8767],{"type":21,"tag":62,"props":8759,"children":8760},{"style":91},[8761],{"type":27,"value":1008},{"type":21,"tag":62,"props":8763,"children":8764},{"style":79},[8765],{"type":27,"value":8766}," $status; ",{"type":21,"tag":62,"props":8768,"children":8769},{"style":69},[8770],{"type":27,"value":8771},"\u002F\u002F \"Adult\"\n",{"type":21,"tag":62,"props":8773,"children":8775},{"class":64,"line":8774},58,[8776],{"type":21,"tag":62,"props":8777,"children":8778},{"emptyLinePlaceholder":136},[8779],{"type":27,"value":139},{"type":21,"tag":62,"props":8781,"children":8783},{"class":64,"line":8782},59,[8784],{"type":21,"tag":62,"props":8785,"children":8786},{"style":69},[8787],{"type":27,"value":8788},"\u002F\u002F Null Coalescing Operator\n",{"type":21,"tag":62,"props":8790,"children":8792},{"class":64,"line":8791},60,[8793,8798,8802,8807,8812,8816,8820,8825],{"type":21,"tag":62,"props":8794,"children":8795},{"style":79},[8796],{"type":27,"value":8797},"$username ",{"type":21,"tag":62,"props":8799,"children":8800},{"style":85},[8801],{"type":27,"value":88},{"type":21,"tag":62,"props":8803,"children":8804},{"style":79},[8805],{"type":27,"value":8806}," $_GET[",{"type":21,"tag":62,"props":8808,"children":8809},{"style":102},[8810],{"type":27,"value":8811},"'username'",{"type":21,"tag":62,"props":8813,"children":8814},{"style":79},[8815],{"type":27,"value":6816},{"type":21,"tag":62,"props":8817,"children":8818},{"style":85},[8819],{"type":27,"value":7746},{"type":21,"tag":62,"props":8821,"children":8822},{"style":102},[8823],{"type":27,"value":8824}," 'Guest'",{"type":21,"tag":62,"props":8826,"children":8827},{"style":79},[8828],{"type":27,"value":1455},{"type":21,"tag":62,"props":8830,"children":8832},{"class":64,"line":8831},61,[8833,8837,8842],{"type":21,"tag":62,"props":8834,"children":8835},{"style":91},[8836],{"type":27,"value":1008},{"type":21,"tag":62,"props":8838,"children":8839},{"style":79},[8840],{"type":27,"value":8841}," $username; ",{"type":21,"tag":62,"props":8843,"children":8844},{"style":69},[8845],{"type":27,"value":8846},"\u002F\u002F Outputs the username if it exists, otherwise \"Guest\"\n",{"type":21,"tag":1260,"props":8848,"children":8850},{"id":8849},"operator-precedence",[8851],{"type":27,"value":7754},{"type":21,"tag":30,"props":8853,"children":8854},{},[8855],{"type":27,"value":8856},"Operator precedence determines the order in which operators are evaluated in an expression. In PHP, the operator precedence is as follows (from highest to lowest):",{"type":21,"tag":1638,"props":8858,"children":8859},{},[8860,8876,8904,8931,8951,8965,8979,9005,9031,9039,9047,9055,9063,9072,9080,9118],{"type":21,"tag":1322,"props":8861,"children":8862},{},[8863,8869,8870],{"type":21,"tag":36,"props":8864,"children":8866},{"className":8865},[],[8867],{"type":27,"value":8868},"clone",{"type":27,"value":110},{"type":21,"tag":36,"props":8871,"children":8873},{"className":8872},[],[8874],{"type":27,"value":8875},"new",{"type":21,"tag":1322,"props":8877,"children":8878},{},[8879,8884,8885,8891,8892,8897,8898],{"type":21,"tag":36,"props":8880,"children":8882},{"className":8881},[],[8883],{"type":27,"value":49},{"type":27,"value":110},{"type":21,"tag":36,"props":8886,"children":8888},{"className":8887},[],[8889],{"type":27,"value":8890},"()",{"type":27,"value":110},{"type":21,"tag":36,"props":8893,"children":8895},{"className":8894},[],[8896],{"type":27,"value":3525},{"type":27,"value":110},{"type":21,"tag":36,"props":8899,"children":8901},{"className":8900},[],[8902],{"type":27,"value":8903},"::",{"type":21,"tag":1322,"props":8905,"children":8906},{},[8907,8912,8913,8918,8919,8925,8926],{"type":21,"tag":36,"props":8908,"children":8910},{"className":8909},[],[8911],{"type":27,"value":4006},{"type":27,"value":110},{"type":21,"tag":36,"props":8914,"children":8916},{"className":8915},[],[8917],{"type":27,"value":7517},{"type":27,"value":110},{"type":21,"tag":36,"props":8920,"children":8922},{"className":8921},[],[8923],{"type":27,"value":8924},"!",{"type":27,"value":110},{"type":21,"tag":36,"props":8927,"children":8929},{"className":8928},[],[8930],{"type":27,"value":7688},{"type":21,"tag":1322,"props":8932,"children":8933},{},[8934,8939,8940,8945,8946],{"type":21,"tag":36,"props":8935,"children":8937},{"className":8936},[],[8938],{"type":27,"value":6076},{"type":27,"value":110},{"type":21,"tag":36,"props":8941,"children":8943},{"className":8942},[],[8944],{"type":27,"value":7338},{"type":27,"value":110},{"type":21,"tag":36,"props":8947,"children":8949},{"className":8948},[],[8950],{"type":27,"value":581},{"type":21,"tag":1322,"props":8952,"children":8953},{},[8954,8959,8960],{"type":21,"tag":36,"props":8955,"children":8957},{"className":8956},[],[8958],{"type":27,"value":826},{"type":27,"value":110},{"type":21,"tag":36,"props":8961,"children":8963},{"className":8962},[],[8964],{"type":27,"value":1086},{"type":21,"tag":1322,"props":8966,"children":8967},{},[8968,8973,8974],{"type":21,"tag":36,"props":8969,"children":8971},{"className":8970},[],[8972],{"type":27,"value":7695},{"type":27,"value":110},{"type":21,"tag":36,"props":8975,"children":8977},{"className":8976},[],[8978],{"type":27,"value":7702},{"type":21,"tag":1322,"props":8980,"children":8981},{},[8982,8987,8988,8993,8994,8999,9000],{"type":21,"tag":36,"props":8983,"children":8985},{"className":8984},[],[8986],{"type":27,"value":3992},{"type":27,"value":110},{"type":21,"tag":36,"props":8989,"children":8991},{"className":8990},[],[8992],{"type":27,"value":6028},{"type":27,"value":110},{"type":21,"tag":36,"props":8995,"children":8997},{"className":8996},[],[8998],{"type":27,"value":6629},{"type":27,"value":110},{"type":21,"tag":36,"props":9001,"children":9003},{"className":9002},[],[9004],{"type":27,"value":4437},{"type":21,"tag":1322,"props":9006,"children":9007},{},[9008,9013,9014,9019,9020,9025,9026],{"type":21,"tag":36,"props":9009,"children":9011},{"className":9010},[],[9012],{"type":27,"value":5173},{"type":27,"value":110},{"type":21,"tag":36,"props":9015,"children":9017},{"className":9016},[],[9018],{"type":27,"value":7434},{"type":27,"value":110},{"type":21,"tag":36,"props":9021,"children":9023},{"className":9022},[],[9024],{"type":27,"value":3913},{"type":27,"value":110},{"type":21,"tag":36,"props":9027,"children":9029},{"className":9028},[],[9030],{"type":27,"value":7441},{"type":21,"tag":1322,"props":9032,"children":9033},{},[9034],{"type":21,"tag":36,"props":9035,"children":9037},{"className":9036},[],[9038],{"type":27,"value":7667},{"type":21,"tag":1322,"props":9040,"children":9041},{},[9042],{"type":21,"tag":36,"props":9043,"children":9045},{"className":9044},[],[9046],{"type":27,"value":7681},{"type":21,"tag":1322,"props":9048,"children":9049},{},[9050],{"type":21,"tag":36,"props":9051,"children":9053},{"className":9052},[],[9054],{"type":27,"value":7674},{"type":21,"tag":1322,"props":9056,"children":9057},{},[9058],{"type":21,"tag":36,"props":9059,"children":9061},{"className":9060},[],[9062],{"type":27,"value":7487},{"type":21,"tag":1322,"props":9064,"children":9065},{},[9066],{"type":21,"tag":36,"props":9067,"children":9069},{"className":9068},[],[9070],{"type":27,"value":9071},"||",{"type":21,"tag":1322,"props":9073,"children":9074},{},[9075],{"type":21,"tag":36,"props":9076,"children":9078},{"className":9077},[],[9079],{"type":27,"value":7724},{"type":21,"tag":1322,"props":9081,"children":9082},{},[9083,9088,9089,9094,9095,9100,9101,9106,9107,9112,9113],{"type":21,"tag":36,"props":9084,"children":9086},{"className":9085},[],[9087],{"type":27,"value":88},{"type":27,"value":110},{"type":21,"tag":36,"props":9090,"children":9092},{"className":9091},[],[9093],{"type":27,"value":7372},{"type":27,"value":110},{"type":21,"tag":36,"props":9096,"children":9098},{"className":9097},[],[9099],{"type":27,"value":7379},{"type":27,"value":110},{"type":21,"tag":36,"props":9102,"children":9104},{"className":9103},[],[9105],{"type":27,"value":7386},{"type":27,"value":110},{"type":21,"tag":36,"props":9108,"children":9110},{"className":9109},[],[9111],{"type":27,"value":7393},{"type":27,"value":110},{"type":21,"tag":36,"props":9114,"children":9116},{"className":9115},[],[9117],{"type":27,"value":7400},{"type":21,"tag":1322,"props":9119,"children":9120},{},[9121,9127,9128,9134,9135],{"type":21,"tag":36,"props":9122,"children":9124},{"className":9123},[],[9125],{"type":27,"value":9126},"and",{"type":27,"value":110},{"type":21,"tag":36,"props":9129,"children":9131},{"className":9130},[],[9132],{"type":27,"value":9133},"xor",{"type":27,"value":110},{"type":21,"tag":36,"props":9136,"children":9138},{"className":9137},[],[9139],{"type":27,"value":9140},"or",{"type":21,"tag":30,"props":9142,"children":9143},{},[9144],{"type":27,"value":9145},"Understanding operator precedence is crucial for writing correct and efficient code, as it affects how expressions are evaluated. You can use parentheses to explicitly define the order of evaluation when necessary.",{"type":21,"tag":53,"props":9147,"children":9149},{"className":55,"code":9148,"language":12,"meta":8,"style":8},"$result = 10 + 5 * 2; \u002F\u002F Result is 20 due to operator precedence\n\n$result = (10 + 5) * 2; \u002F\u002F Result is 30 due to parentheses\n",[9150],{"type":21,"tag":36,"props":9151,"children":9152},{"__ignoreMap":8},[9153,9193,9200],{"type":21,"tag":62,"props":9154,"children":9155},{"class":64,"line":65},[9156,9160,9164,9168,9172,9176,9180,9184,9188],{"type":21,"tag":62,"props":9157,"children":9158},{"style":79},[9159],{"type":27,"value":1548},{"type":21,"tag":62,"props":9161,"children":9162},{"style":85},[9163],{"type":27,"value":88},{"type":21,"tag":62,"props":9165,"children":9166},{"style":91},[9167],{"type":27,"value":5144},{"type":21,"tag":62,"props":9169,"children":9170},{"style":85},[9171],{"type":27,"value":3735},{"type":21,"tag":62,"props":9173,"children":9174},{"style":91},[9175],{"type":27,"value":1566},{"type":21,"tag":62,"props":9177,"children":9178},{"style":85},[9179],{"type":27,"value":3789},{"type":21,"tag":62,"props":9181,"children":9182},{"style":91},[9183],{"type":27,"value":444},{"type":21,"tag":62,"props":9185,"children":9186},{"style":79},[9187],{"type":27,"value":1571},{"type":21,"tag":62,"props":9189,"children":9190},{"style":69},[9191],{"type":27,"value":9192},"\u002F\u002F Result is 20 due to operator precedence\n",{"type":21,"tag":62,"props":9194,"children":9195},{"class":64,"line":75},[9196],{"type":21,"tag":62,"props":9197,"children":9198},{"emptyLinePlaceholder":136},[9199],{"type":27,"value":139},{"type":21,"tag":62,"props":9201,"children":9202},{"class":64,"line":132},[9203,9207,9211,9215,9219,9223,9227,9231,9235,9239,9243],{"type":21,"tag":62,"props":9204,"children":9205},{"style":79},[9206],{"type":27,"value":1548},{"type":21,"tag":62,"props":9208,"children":9209},{"style":85},[9210],{"type":27,"value":88},{"type":21,"tag":62,"props":9212,"children":9213},{"style":79},[9214],{"type":27,"value":1294},{"type":21,"tag":62,"props":9216,"children":9217},{"style":91},[9218],{"type":27,"value":3784},{"type":21,"tag":62,"props":9220,"children":9221},{"style":85},[9222],{"type":27,"value":3735},{"type":21,"tag":62,"props":9224,"children":9225},{"style":91},[9226],{"type":27,"value":1566},{"type":21,"tag":62,"props":9228,"children":9229},{"style":79},[9230],{"type":27,"value":3798},{"type":21,"tag":62,"props":9232,"children":9233},{"style":85},[9234],{"type":27,"value":6076},{"type":21,"tag":62,"props":9236,"children":9237},{"style":91},[9238],{"type":27,"value":444},{"type":21,"tag":62,"props":9240,"children":9241},{"style":79},[9242],{"type":27,"value":1571},{"type":21,"tag":62,"props":9244,"children":9245},{"style":69},[9246],{"type":27,"value":9247},"\u002F\u002F Result is 30 due to parentheses\n",{"type":21,"tag":30,"props":9249,"children":9250},{},[9251],{"type":27,"value":9252},"Operators are fundamental to programming in PHP, and mastering their usage will allow you to write more complex and efficient code. Always consider the context in which you are using operators and be mindful of operator precedence to ensure your code behaves as expected.",{"type":21,"tag":1221,"props":9254,"children":9255},{},[9256],{"type":27,"value":1225},{"title":8,"searchDepth":132,"depth":132,"links":9258},[9259],{"id":7261,"depth":75,"text":7268,"children":9260},[9261,9262],{"id":2131,"depth":132,"text":2134},{"id":8849,"depth":132,"text":7754},"content:php:php-fundamental:operator.md","php\u002Fphp-fundamental\u002Foperator.md","php\u002Fphp-fundamental\u002Foperator",{"_path":9267,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9268,"description":9269,"tags":9270,"date":15,"weight":75,"body":9273,"_type":1234,"_id":10126,"_source":1236,"_file":10127,"_stem":10128,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Foutput-input","PHP Output & Input","Learning about PHP output and input methods",[12,13,9271,9272],"output","input",{"type":18,"children":9274,"toc":10112},[9275,9281,9308,9313,9324,9362,9367,9384,9421,9426,9437,9503,9509,9544,9550,9584,9689,9695,9713,9814,9820,9864,9965,9971,9983,10099,10103,10108],{"type":21,"tag":22,"props":9276,"children":9278},{"id":9277},"php-output-methods",[9279],{"type":27,"value":9280},"PHP Output Methods",{"type":21,"tag":30,"props":9282,"children":9283},{},[9284,9286,9291,9292,9298,9300,9306],{"type":27,"value":9285},"In PHP, there are several ways to output data to the browser. The most common methods include ",{"type":21,"tag":36,"props":9287,"children":9289},{"className":9288},[],[9290],{"type":27,"value":1008},{"type":27,"value":110},{"type":21,"tag":36,"props":9293,"children":9295},{"className":9294},[],[9296],{"type":27,"value":9297},"print",{"type":27,"value":9299},", and ",{"type":21,"tag":36,"props":9301,"children":9303},{"className":9302},[],[9304],{"type":27,"value":9305},"printf",{"type":27,"value":9307},". Each of these functions has its own use cases and advantages.",{"type":21,"tag":1260,"props":9309,"children":9310},{"id":1008},[9311],{"type":27,"value":9312},"Echo",{"type":21,"tag":30,"props":9314,"children":9315},{},[9316,9317,9322],{"type":27,"value":333},{"type":21,"tag":36,"props":9318,"children":9320},{"className":9319},[],[9321],{"type":27,"value":1008},{"type":27,"value":9323}," statement is used to output one or more strings. It is a language construct and does not return a value.",{"type":21,"tag":53,"props":9325,"children":9327},{"className":55,"code":9326,"language":12,"meta":8,"style":8},"echo \"Hello, World!\";\necho \"This is PHP output.\";\n",[9328],{"type":21,"tag":36,"props":9329,"children":9330},{"__ignoreMap":8},[9331,9346],{"type":21,"tag":62,"props":9332,"children":9333},{"class":64,"line":65},[9334,9338,9342],{"type":21,"tag":62,"props":9335,"children":9336},{"style":91},[9337],{"type":27,"value":1008},{"type":21,"tag":62,"props":9339,"children":9340},{"style":102},[9341],{"type":27,"value":2200},{"type":21,"tag":62,"props":9343,"children":9344},{"style":79},[9345],{"type":27,"value":1455},{"type":21,"tag":62,"props":9347,"children":9348},{"class":64,"line":75},[9349,9353,9358],{"type":21,"tag":62,"props":9350,"children":9351},{"style":91},[9352],{"type":27,"value":1008},{"type":21,"tag":62,"props":9354,"children":9355},{"style":102},[9356],{"type":27,"value":9357}," \"This is PHP output.\"",{"type":21,"tag":62,"props":9359,"children":9360},{"style":79},[9361],{"type":27,"value":1455},{"type":21,"tag":1260,"props":9363,"children":9364},{"id":9297},[9365],{"type":27,"value":9366},"Print",{"type":21,"tag":30,"props":9368,"children":9369},{},[9370,9371,9376,9377,9382],{"type":27,"value":333},{"type":21,"tag":36,"props":9372,"children":9374},{"className":9373},[],[9375],{"type":27,"value":9297},{"type":27,"value":7011},{"type":21,"tag":36,"props":9378,"children":9380},{"className":9379},[],[9381],{"type":27,"value":1008},{"type":27,"value":9383},", but it returns a value of 1, which can be useful in certain situations.",{"type":21,"tag":53,"props":9385,"children":9387},{"className":55,"code":9386,"language":12,"meta":8,"style":8},"print \"Hello, World!\";\nprint \"This is PHP output.\";\n",[9388],{"type":21,"tag":36,"props":9389,"children":9390},{"__ignoreMap":8},[9391,9406],{"type":21,"tag":62,"props":9392,"children":9393},{"class":64,"line":65},[9394,9398,9402],{"type":21,"tag":62,"props":9395,"children":9396},{"style":91},[9397],{"type":27,"value":9297},{"type":21,"tag":62,"props":9399,"children":9400},{"style":102},[9401],{"type":27,"value":2200},{"type":21,"tag":62,"props":9403,"children":9404},{"style":79},[9405],{"type":27,"value":1455},{"type":21,"tag":62,"props":9407,"children":9408},{"class":64,"line":75},[9409,9413,9417],{"type":21,"tag":62,"props":9410,"children":9411},{"style":91},[9412],{"type":27,"value":9297},{"type":21,"tag":62,"props":9414,"children":9415},{"style":102},[9416],{"type":27,"value":9357},{"type":21,"tag":62,"props":9418,"children":9419},{"style":79},[9420],{"type":27,"value":1455},{"type":21,"tag":1260,"props":9422,"children":9423},{"id":9305},[9424],{"type":27,"value":9425},"Printf",{"type":21,"tag":30,"props":9427,"children":9428},{},[9429,9430,9435],{"type":27,"value":333},{"type":21,"tag":36,"props":9431,"children":9433},{"className":9432},[],[9434],{"type":27,"value":9305},{"type":27,"value":9436}," 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":21,"tag":53,"props":9438,"children":9440},{"className":55,"code":9439,"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",[9441],{"type":21,"tag":36,"props":9442,"children":9443},{"__ignoreMap":8},[9444,9463,9482],{"type":21,"tag":62,"props":9445,"children":9446},{"class":64,"line":65},[9447,9451,9455,9459],{"type":21,"tag":62,"props":9448,"children":9449},{"style":79},[9450],{"type":27,"value":2405},{"type":21,"tag":62,"props":9452,"children":9453},{"style":85},[9454],{"type":27,"value":88},{"type":21,"tag":62,"props":9456,"children":9457},{"style":102},[9458],{"type":27,"value":189},{"type":21,"tag":62,"props":9460,"children":9461},{"style":79},[9462],{"type":27,"value":1455},{"type":21,"tag":62,"props":9464,"children":9465},{"class":64,"line":75},[9466,9470,9474,9478],{"type":21,"tag":62,"props":9467,"children":9468},{"style":79},[9469],{"type":27,"value":4362},{"type":21,"tag":62,"props":9471,"children":9472},{"style":85},[9473],{"type":27,"value":88},{"type":21,"tag":62,"props":9475,"children":9476},{"style":91},[9477],{"type":27,"value":212},{"type":21,"tag":62,"props":9479,"children":9480},{"style":79},[9481],{"type":27,"value":1455},{"type":21,"tag":62,"props":9483,"children":9484},{"class":64,"line":132},[9485,9489,9493,9498],{"type":21,"tag":62,"props":9486,"children":9487},{"style":91},[9488],{"type":27,"value":9305},{"type":21,"tag":62,"props":9490,"children":9491},{"style":79},[9492],{"type":27,"value":99},{"type":21,"tag":62,"props":9494,"children":9495},{"style":102},[9496],{"type":27,"value":9497},"\"My name is %s and I am %d years old.\"",{"type":21,"tag":62,"props":9499,"children":9500},{"style":79},[9501],{"type":27,"value":9502},", $name, $age);\n",{"type":21,"tag":22,"props":9504,"children":9506},{"id":9505},"php-input-methods",[9507],{"type":27,"value":9508},"PHP Input Methods",{"type":21,"tag":30,"props":9510,"children":9511},{},[9512,9514,9520,9521,9527,9528,9534,9536,9542],{"type":27,"value":9513},"In PHP, there are several ways to handle input from users or other sources. The most common methods include using superglobals like ",{"type":21,"tag":36,"props":9515,"children":9517},{"className":9516},[],[9518],{"type":27,"value":9519},"$_GET",{"type":27,"value":110},{"type":21,"tag":36,"props":9522,"children":9524},{"className":9523},[],[9525],{"type":27,"value":9526},"$_POST",{"type":27,"value":9299},{"type":21,"tag":36,"props":9529,"children":9531},{"className":9530},[],[9532],{"type":27,"value":9533},"$_REQUEST",{"type":27,"value":9535},", as well as handling command-line arguments with ",{"type":21,"tag":36,"props":9537,"children":9539},{"className":9538},[],[9540],{"type":27,"value":9541},"$argv",{"type":27,"value":9543},". Each of these methods serves a specific purpose and is used in different contexts.",{"type":21,"tag":1260,"props":9545,"children":9547},{"id":9546},"get-method",[9548],{"type":27,"value":9549},"GET Method",{"type":21,"tag":30,"props":9551,"children":9552},{},[9553,9554,9559,9561,9567,9569,9575,9577,9583],{"type":27,"value":333},{"type":21,"tag":36,"props":9555,"children":9557},{"className":9556},[],[9558],{"type":27,"value":9519},{"type":27,"value":9560}," superglobal is used to collect data sent in the URL query string. For example, if you have a URL like ",{"type":21,"tag":36,"props":9562,"children":9564},{"className":9563},[],[9565],{"type":27,"value":9566},"http:\u002F\u002Fexample.com?name=John",{"type":27,"value":9568},", you can access the value of ",{"type":21,"tag":36,"props":9570,"children":9572},{"className":9571},[],[9573],{"type":27,"value":9574},"name",{"type":27,"value":9576}," using ",{"type":21,"tag":36,"props":9578,"children":9580},{"className":9579},[],[9581],{"type":27,"value":9582},"$_GET['name']",{"type":27,"value":1426},{"type":21,"tag":53,"props":9585,"children":9587},{"className":55,"code":9586,"language":12,"meta":8,"style":8},"if (isset($_GET['name'])) {\n    $name = $_GET['name'];\n    echo \"Hello, \" . htmlspecialchars($name) . \"!\";\n}\n",[9588],{"type":21,"tag":36,"props":9589,"children":9590},{"__ignoreMap":8},[9591,9621,9645,9682],{"type":21,"tag":62,"props":9592,"children":9593},{"class":64,"line":65},[9594,9598,9602,9607,9612,9616],{"type":21,"tag":62,"props":9595,"children":9596},{"style":85},[9597],{"type":27,"value":3903},{"type":21,"tag":62,"props":9599,"children":9600},{"style":79},[9601],{"type":27,"value":1294},{"type":21,"tag":62,"props":9603,"children":9604},{"style":91},[9605],{"type":27,"value":9606},"isset",{"type":21,"tag":62,"props":9608,"children":9609},{"style":79},[9610],{"type":27,"value":9611},"($_GET[",{"type":21,"tag":62,"props":9613,"children":9614},{"style":102},[9615],{"type":27,"value":662},{"type":21,"tag":62,"props":9617,"children":9618},{"style":79},[9619],{"type":27,"value":9620},"])) {\n",{"type":21,"tag":62,"props":9622,"children":9623},{"class":64,"line":75},[9624,9629,9633,9637,9641],{"type":21,"tag":62,"props":9625,"children":9626},{"style":79},[9627],{"type":27,"value":9628},"    $name ",{"type":21,"tag":62,"props":9630,"children":9631},{"style":85},[9632],{"type":27,"value":88},{"type":21,"tag":62,"props":9634,"children":9635},{"style":79},[9636],{"type":27,"value":8806},{"type":21,"tag":62,"props":9638,"children":9639},{"style":102},[9640],{"type":27,"value":662},{"type":21,"tag":62,"props":9642,"children":9643},{"style":79},[9644],{"type":27,"value":322},{"type":21,"tag":62,"props":9646,"children":9647},{"class":64,"line":132},[9648,9652,9656,9660,9665,9670,9674,9678],{"type":21,"tag":62,"props":9649,"children":9650},{"style":91},[9651],{"type":27,"value":3930},{"type":21,"tag":62,"props":9653,"children":9654},{"style":102},[9655],{"type":27,"value":1888},{"type":21,"tag":62,"props":9657,"children":9658},{"style":85},[9659],{"type":27,"value":1893},{"type":21,"tag":62,"props":9661,"children":9662},{"style":91},[9663],{"type":27,"value":9664}," htmlspecialchars",{"type":21,"tag":62,"props":9666,"children":9667},{"style":79},[9668],{"type":27,"value":9669},"($name) ",{"type":21,"tag":62,"props":9671,"children":9672},{"style":85},[9673],{"type":27,"value":1426},{"type":21,"tag":62,"props":9675,"children":9676},{"style":102},[9677],{"type":27,"value":1907},{"type":21,"tag":62,"props":9679,"children":9680},{"style":79},[9681],{"type":27,"value":1455},{"type":21,"tag":62,"props":9683,"children":9684},{"class":64,"line":142},[9685],{"type":21,"tag":62,"props":9686,"children":9687},{"style":79},[9688],{"type":27,"value":960},{"type":21,"tag":1260,"props":9690,"children":9692},{"id":9691},"post-method",[9693],{"type":27,"value":9694},"POST Method",{"type":21,"tag":30,"props":9696,"children":9697},{},[9698,9699,9704,9706,9712],{"type":27,"value":333},{"type":21,"tag":36,"props":9700,"children":9702},{"className":9701},[],[9703],{"type":27,"value":9526},{"type":27,"value":9705}," 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":21,"tag":36,"props":9707,"children":9709},{"className":9708},[],[9710],{"type":27,"value":9711},"$_POST['name']",{"type":27,"value":1426},{"type":21,"tag":53,"props":9714,"children":9716},{"className":55,"code":9715,"language":12,"meta":8,"style":8},"if (isset($_POST['name'])) {\n    $name = $_POST['name'];\n    echo \"Hello, \" . htmlspecialchars($name) . \"!\";\n}\n",[9717],{"type":21,"tag":36,"props":9718,"children":9719},{"__ignoreMap":8},[9720,9748,9772,9807],{"type":21,"tag":62,"props":9721,"children":9722},{"class":64,"line":65},[9723,9727,9731,9735,9740,9744],{"type":21,"tag":62,"props":9724,"children":9725},{"style":85},[9726],{"type":27,"value":3903},{"type":21,"tag":62,"props":9728,"children":9729},{"style":79},[9730],{"type":27,"value":1294},{"type":21,"tag":62,"props":9732,"children":9733},{"style":91},[9734],{"type":27,"value":9606},{"type":21,"tag":62,"props":9736,"children":9737},{"style":79},[9738],{"type":27,"value":9739},"($_POST[",{"type":21,"tag":62,"props":9741,"children":9742},{"style":102},[9743],{"type":27,"value":662},{"type":21,"tag":62,"props":9745,"children":9746},{"style":79},[9747],{"type":27,"value":9620},{"type":21,"tag":62,"props":9749,"children":9750},{"class":64,"line":75},[9751,9755,9759,9764,9768],{"type":21,"tag":62,"props":9752,"children":9753},{"style":79},[9754],{"type":27,"value":9628},{"type":21,"tag":62,"props":9756,"children":9757},{"style":85},[9758],{"type":27,"value":88},{"type":21,"tag":62,"props":9760,"children":9761},{"style":79},[9762],{"type":27,"value":9763}," $_POST[",{"type":21,"tag":62,"props":9765,"children":9766},{"style":102},[9767],{"type":27,"value":662},{"type":21,"tag":62,"props":9769,"children":9770},{"style":79},[9771],{"type":27,"value":322},{"type":21,"tag":62,"props":9773,"children":9774},{"class":64,"line":132},[9775,9779,9783,9787,9791,9795,9799,9803],{"type":21,"tag":62,"props":9776,"children":9777},{"style":91},[9778],{"type":27,"value":3930},{"type":21,"tag":62,"props":9780,"children":9781},{"style":102},[9782],{"type":27,"value":1888},{"type":21,"tag":62,"props":9784,"children":9785},{"style":85},[9786],{"type":27,"value":1893},{"type":21,"tag":62,"props":9788,"children":9789},{"style":91},[9790],{"type":27,"value":9664},{"type":21,"tag":62,"props":9792,"children":9793},{"style":79},[9794],{"type":27,"value":9669},{"type":21,"tag":62,"props":9796,"children":9797},{"style":85},[9798],{"type":27,"value":1426},{"type":21,"tag":62,"props":9800,"children":9801},{"style":102},[9802],{"type":27,"value":1907},{"type":21,"tag":62,"props":9804,"children":9805},{"style":79},[9806],{"type":27,"value":1455},{"type":21,"tag":62,"props":9808,"children":9809},{"class":64,"line":142},[9810],{"type":21,"tag":62,"props":9811,"children":9812},{"style":79},[9813],{"type":27,"value":960},{"type":21,"tag":1260,"props":9815,"children":9817},{"id":9816},"request-method",[9818],{"type":27,"value":9819},"REQUEST Method",{"type":21,"tag":30,"props":9821,"children":9822},{},[9823,9824,9829,9831,9836,9837,9842,9843,9849,9851,9856,9857,9862],{"type":27,"value":333},{"type":21,"tag":36,"props":9825,"children":9827},{"className":9826},[],[9828],{"type":27,"value":9533},{"type":27,"value":9830}," superglobal is a combination of ",{"type":21,"tag":36,"props":9832,"children":9834},{"className":9833},[],[9835],{"type":27,"value":9519},{"type":27,"value":110},{"type":21,"tag":36,"props":9838,"children":9840},{"className":9839},[],[9841],{"type":27,"value":9526},{"type":27,"value":9299},{"type":21,"tag":36,"props":9844,"children":9846},{"className":9845},[],[9847],{"type":27,"value":9848},"$_COOKIE",{"type":27,"value":9850},". It can be used to access data from any of these sources, but it is generally recommended to use ",{"type":21,"tag":36,"props":9852,"children":9854},{"className":9853},[],[9855],{"type":27,"value":9519},{"type":27,"value":1331},{"type":21,"tag":36,"props":9858,"children":9860},{"className":9859},[],[9861],{"type":27,"value":9526},{"type":27,"value":9863}," explicitly for better security and clarity.",{"type":21,"tag":53,"props":9865,"children":9867},{"className":55,"code":9866,"language":12,"meta":8,"style":8},"if (isset($_REQUEST['name'])) {\n    $name = $_REQUEST['name'];\n    echo \"Hello, \" . htmlspecialchars($name) . \"!\";\n}\n",[9868],{"type":21,"tag":36,"props":9869,"children":9870},{"__ignoreMap":8},[9871,9899,9923,9958],{"type":21,"tag":62,"props":9872,"children":9873},{"class":64,"line":65},[9874,9878,9882,9886,9891,9895],{"type":21,"tag":62,"props":9875,"children":9876},{"style":85},[9877],{"type":27,"value":3903},{"type":21,"tag":62,"props":9879,"children":9880},{"style":79},[9881],{"type":27,"value":1294},{"type":21,"tag":62,"props":9883,"children":9884},{"style":91},[9885],{"type":27,"value":9606},{"type":21,"tag":62,"props":9887,"children":9888},{"style":79},[9889],{"type":27,"value":9890},"($_REQUEST[",{"type":21,"tag":62,"props":9892,"children":9893},{"style":102},[9894],{"type":27,"value":662},{"type":21,"tag":62,"props":9896,"children":9897},{"style":79},[9898],{"type":27,"value":9620},{"type":21,"tag":62,"props":9900,"children":9901},{"class":64,"line":75},[9902,9906,9910,9915,9919],{"type":21,"tag":62,"props":9903,"children":9904},{"style":79},[9905],{"type":27,"value":9628},{"type":21,"tag":62,"props":9907,"children":9908},{"style":85},[9909],{"type":27,"value":88},{"type":21,"tag":62,"props":9911,"children":9912},{"style":79},[9913],{"type":27,"value":9914}," $_REQUEST[",{"type":21,"tag":62,"props":9916,"children":9917},{"style":102},[9918],{"type":27,"value":662},{"type":21,"tag":62,"props":9920,"children":9921},{"style":79},[9922],{"type":27,"value":322},{"type":21,"tag":62,"props":9924,"children":9925},{"class":64,"line":132},[9926,9930,9934,9938,9942,9946,9950,9954],{"type":21,"tag":62,"props":9927,"children":9928},{"style":91},[9929],{"type":27,"value":3930},{"type":21,"tag":62,"props":9931,"children":9932},{"style":102},[9933],{"type":27,"value":1888},{"type":21,"tag":62,"props":9935,"children":9936},{"style":85},[9937],{"type":27,"value":1893},{"type":21,"tag":62,"props":9939,"children":9940},{"style":91},[9941],{"type":27,"value":9664},{"type":21,"tag":62,"props":9943,"children":9944},{"style":79},[9945],{"type":27,"value":9669},{"type":21,"tag":62,"props":9947,"children":9948},{"style":85},[9949],{"type":27,"value":1426},{"type":21,"tag":62,"props":9951,"children":9952},{"style":102},[9953],{"type":27,"value":1907},{"type":21,"tag":62,"props":9955,"children":9956},{"style":79},[9957],{"type":27,"value":1455},{"type":21,"tag":62,"props":9959,"children":9960},{"class":64,"line":142},[9961],{"type":21,"tag":62,"props":9962,"children":9963},{"style":79},[9964],{"type":27,"value":960},{"type":21,"tag":1260,"props":9966,"children":9968},{"id":9967},"arguments-from-command-line",[9969],{"type":27,"value":9970},"Arguments from Command Line",{"type":21,"tag":30,"props":9972,"children":9973},{},[9974,9976,9981],{"type":27,"value":9975},"When running a PHP script from the command line, you can access arguments passed to the script using the ",{"type":21,"tag":36,"props":9977,"children":9979},{"className":9978},[],[9980],{"type":27,"value":9541},{"type":27,"value":9982}," array. The first element of this array is the script name, and subsequent elements are the arguments.",{"type":21,"tag":53,"props":9984,"children":9986},{"className":55,"code":9985,"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",[9987],{"type":21,"tag":36,"props":9988,"children":9989},{"__ignoreMap":8},[9990,10018,10042,10077,10084,10091],{"type":21,"tag":62,"props":9991,"children":9992},{"class":64,"line":65},[9993,9997,10001,10005,10010,10014],{"type":21,"tag":62,"props":9994,"children":9995},{"style":85},[9996],{"type":27,"value":3903},{"type":21,"tag":62,"props":9998,"children":9999},{"style":79},[10000],{"type":27,"value":1294},{"type":21,"tag":62,"props":10002,"children":10003},{"style":91},[10004],{"type":27,"value":9606},{"type":21,"tag":62,"props":10006,"children":10007},{"style":79},[10008],{"type":27,"value":10009},"($argv[",{"type":21,"tag":62,"props":10011,"children":10012},{"style":91},[10013],{"type":27,"value":281},{"type":21,"tag":62,"props":10015,"children":10016},{"style":79},[10017],{"type":27,"value":9620},{"type":21,"tag":62,"props":10019,"children":10020},{"class":64,"line":75},[10021,10025,10029,10034,10038],{"type":21,"tag":62,"props":10022,"children":10023},{"style":79},[10024],{"type":27,"value":9628},{"type":21,"tag":62,"props":10026,"children":10027},{"style":85},[10028],{"type":27,"value":88},{"type":21,"tag":62,"props":10030,"children":10031},{"style":79},[10032],{"type":27,"value":10033}," $argv[",{"type":21,"tag":62,"props":10035,"children":10036},{"style":91},[10037],{"type":27,"value":281},{"type":21,"tag":62,"props":10039,"children":10040},{"style":79},[10041],{"type":27,"value":322},{"type":21,"tag":62,"props":10043,"children":10044},{"class":64,"line":132},[10045,10049,10053,10057,10061,10065,10069,10073],{"type":21,"tag":62,"props":10046,"children":10047},{"style":91},[10048],{"type":27,"value":3930},{"type":21,"tag":62,"props":10050,"children":10051},{"style":102},[10052],{"type":27,"value":1888},{"type":21,"tag":62,"props":10054,"children":10055},{"style":85},[10056],{"type":27,"value":1893},{"type":21,"tag":62,"props":10058,"children":10059},{"style":91},[10060],{"type":27,"value":9664},{"type":21,"tag":62,"props":10062,"children":10063},{"style":79},[10064],{"type":27,"value":9669},{"type":21,"tag":62,"props":10066,"children":10067},{"style":85},[10068],{"type":27,"value":1426},{"type":21,"tag":62,"props":10070,"children":10071},{"style":102},[10072],{"type":27,"value":1907},{"type":21,"tag":62,"props":10074,"children":10075},{"style":79},[10076],{"type":27,"value":1455},{"type":21,"tag":62,"props":10078,"children":10079},{"class":64,"line":142},[10080],{"type":21,"tag":62,"props":10081,"children":10082},{"style":79},[10083],{"type":27,"value":960},{"type":21,"tag":62,"props":10085,"children":10086},{"class":64,"line":151},[10087],{"type":21,"tag":62,"props":10088,"children":10089},{"emptyLinePlaceholder":136},[10090],{"type":27,"value":139},{"type":21,"tag":62,"props":10092,"children":10093},{"class":64,"line":173},[10094],{"type":21,"tag":62,"props":10095,"children":10096},{"style":69},[10097],{"type":27,"value":10098},"\u002F\u002F Example usage: php script.php John\n",{"type":21,"tag":22,"props":10100,"children":10101},{"id":1596},[10102],{"type":27,"value":1599},{"type":21,"tag":30,"props":10104,"children":10105},{},[10106],{"type":27,"value":10107},"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":21,"tag":1221,"props":10109,"children":10110},{},[10111],{"type":27,"value":1225},{"title":8,"searchDepth":132,"depth":132,"links":10113},[10114,10119,10125],{"id":9277,"depth":75,"text":9280,"children":10115},[10116,10117,10118],{"id":1008,"depth":132,"text":9312},{"id":9297,"depth":132,"text":9366},{"id":9305,"depth":132,"text":9425},{"id":9505,"depth":75,"text":9508,"children":10120},[10121,10122,10123,10124],{"id":9546,"depth":132,"text":9549},{"id":9691,"depth":132,"text":9694},{"id":9816,"depth":132,"text":9819},{"id":9967,"depth":132,"text":9970},{"id":1596,"depth":75,"text":1599},"content:php:php-fundamental:output-input.md","php\u002Fphp-fundamental\u002Foutput-input.md","php\u002Fphp-fundamental\u002Foutput-input",{"_path":10130,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":10131,"description":10132,"tags":10133,"date":15,"weight":142,"body":10141,"_type":1234,"_id":11436,"_source":1236,"_file":11437,"_stem":11438,"_extension":1239},"\u002Fphp\u002Fphp-fundamental\u002Fvariables","PHP Variables","Essential PHP variables, constants, magic constants, and variable scope",[12,13,10134,10135,10136,10137,10138,10139,10140],"variables","constants","magic constants","scope","global","local","static",{"type":18,"children":10142,"toc":11423},[10143,10148,10161,10226,10231,10259,10321,10327,10332,10472,10583,10589,10594,10667,10755,10891,10897,10917,10930,11023,11034,11118,11124,11129,11283,11419],{"type":21,"tag":22,"props":10144,"children":10145},{"id":10134},[10146],{"type":27,"value":10147},"Variables",{"type":21,"tag":30,"props":10149,"children":10150},{},[10151,10153,10159],{"type":27,"value":10152},"In PHP, variables are denoted by a dollar sign (",{"type":21,"tag":36,"props":10154,"children":10156},{"className":10155},[],[10157],{"type":27,"value":10158},"$",{"type":27,"value":10160},") followed by the variable name. Variable names are case-sensitive and can contain letters, numbers, and underscores, but must start with a letter or an underscore.",{"type":21,"tag":53,"props":10162,"children":10164},{"className":55,"code":10163,"language":12,"meta":8,"style":8},"$name = \"John\";\n$age = 30;\n$isStudent = true;\n",[10165],{"type":21,"tag":36,"props":10166,"children":10167},{"__ignoreMap":8},[10168,10187,10206],{"type":21,"tag":62,"props":10169,"children":10170},{"class":64,"line":65},[10171,10175,10179,10183],{"type":21,"tag":62,"props":10172,"children":10173},{"style":79},[10174],{"type":27,"value":2405},{"type":21,"tag":62,"props":10176,"children":10177},{"style":85},[10178],{"type":27,"value":88},{"type":21,"tag":62,"props":10180,"children":10181},{"style":102},[10182],{"type":27,"value":189},{"type":21,"tag":62,"props":10184,"children":10185},{"style":79},[10186],{"type":27,"value":1455},{"type":21,"tag":62,"props":10188,"children":10189},{"class":64,"line":75},[10190,10194,10198,10202],{"type":21,"tag":62,"props":10191,"children":10192},{"style":79},[10193],{"type":27,"value":4362},{"type":21,"tag":62,"props":10195,"children":10196},{"style":85},[10197],{"type":27,"value":88},{"type":21,"tag":62,"props":10199,"children":10200},{"style":91},[10201],{"type":27,"value":212},{"type":21,"tag":62,"props":10203,"children":10204},{"style":79},[10205],{"type":27,"value":1455},{"type":21,"tag":62,"props":10207,"children":10208},{"class":64,"line":132},[10209,10214,10218,10222],{"type":21,"tag":62,"props":10210,"children":10211},{"style":79},[10212],{"type":27,"value":10213},"$isStudent ",{"type":21,"tag":62,"props":10215,"children":10216},{"style":85},[10217],{"type":27,"value":88},{"type":21,"tag":62,"props":10219,"children":10220},{"style":91},[10221],{"type":27,"value":2221},{"type":21,"tag":62,"props":10223,"children":10224},{"style":79},[10225],{"type":27,"value":1455},{"type":21,"tag":22,"props":10227,"children":10228},{"id":10135},[10229],{"type":27,"value":10230},"Constants",{"type":21,"tag":30,"props":10232,"children":10233},{},[10234,10236,10242,10244,10250,10252,10257],{"type":27,"value":10235},"In PHP, constants are defined using the ",{"type":21,"tag":36,"props":10237,"children":10239},{"className":10238},[],[10240],{"type":27,"value":10241},"define()",{"type":27,"value":10243}," function or the ",{"type":21,"tag":36,"props":10245,"children":10247},{"className":10246},[],[10248],{"type":27,"value":10249},"const",{"type":27,"value":10251}," keyword. Constants are immutable and do not have a ",{"type":21,"tag":36,"props":10253,"children":10255},{"className":10254},[],[10256],{"type":27,"value":10158},{"type":27,"value":10258}," prefix.",{"type":21,"tag":53,"props":10260,"children":10262},{"className":55,"code":10261,"language":12,"meta":8,"style":8},"define(\"PI\", 3.14);\nconst GRAVITY = 9.81;\n",[10263],{"type":21,"tag":36,"props":10264,"children":10265},{"__ignoreMap":8},[10266,10295],{"type":21,"tag":62,"props":10267,"children":10268},{"class":64,"line":65},[10269,10274,10278,10283,10287,10291],{"type":21,"tag":62,"props":10270,"children":10271},{"style":91},[10272],{"type":27,"value":10273},"define",{"type":21,"tag":62,"props":10275,"children":10276},{"style":79},[10277],{"type":27,"value":99},{"type":21,"tag":62,"props":10279,"children":10280},{"style":102},[10281],{"type":27,"value":10282},"\"PI\"",{"type":21,"tag":62,"props":10284,"children":10285},{"style":79},[10286],{"type":27,"value":110},{"type":21,"tag":62,"props":10288,"children":10289},{"style":91},[10290],{"type":27,"value":3137},{"type":21,"tag":62,"props":10292,"children":10293},{"style":79},[10294],{"type":27,"value":129},{"type":21,"tag":62,"props":10296,"children":10297},{"class":64,"line":75},[10298,10302,10307,10312,10317],{"type":21,"tag":62,"props":10299,"children":10300},{"style":85},[10301],{"type":27,"value":10249},{"type":21,"tag":62,"props":10303,"children":10304},{"style":91},[10305],{"type":27,"value":10306}," GRAVITY",{"type":21,"tag":62,"props":10308,"children":10309},{"style":85},[10310],{"type":27,"value":10311}," =",{"type":21,"tag":62,"props":10313,"children":10314},{"style":91},[10315],{"type":27,"value":10316}," 9.81",{"type":21,"tag":62,"props":10318,"children":10319},{"style":79},[10320],{"type":27,"value":1455},{"type":21,"tag":22,"props":10322,"children":10324},{"id":10323},"magic-constants",[10325],{"type":27,"value":10326},"Magic Constants",{"type":21,"tag":30,"props":10328,"children":10329},{},[10330],{"type":27,"value":10331},"PHP provides several predefined constants called magic constants that change depending on where they are used. Some common magic constants include:",{"type":21,"tag":1959,"props":10333,"children":10334},{},[10335,10350],{"type":21,"tag":1963,"props":10336,"children":10337},{},[10338],{"type":21,"tag":1967,"props":10339,"children":10340},{},[10341,10346],{"type":21,"tag":1971,"props":10342,"children":10343},{},[10344],{"type":27,"value":10345},"Magic Constant",{"type":21,"tag":1971,"props":10347,"children":10348},{},[10349],{"type":27,"value":1980},{"type":21,"tag":1982,"props":10351,"children":10352},{},[10353,10370,10387,10404,10421,10438,10455],{"type":21,"tag":1967,"props":10354,"children":10355},{},[10356,10365],{"type":21,"tag":1989,"props":10357,"children":10358},{},[10359],{"type":21,"tag":36,"props":10360,"children":10362},{"className":10361},[],[10363],{"type":27,"value":10364},"__LINE__",{"type":21,"tag":1989,"props":10366,"children":10367},{},[10368],{"type":27,"value":10369},"The current line number of the file.",{"type":21,"tag":1967,"props":10371,"children":10372},{},[10373,10382],{"type":21,"tag":1989,"props":10374,"children":10375},{},[10376],{"type":21,"tag":36,"props":10377,"children":10379},{"className":10378},[],[10380],{"type":27,"value":10381},"__FILE__",{"type":21,"tag":1989,"props":10383,"children":10384},{},[10385],{"type":27,"value":10386},"The full path and filename of the file.",{"type":21,"tag":1967,"props":10388,"children":10389},{},[10390,10399],{"type":21,"tag":1989,"props":10391,"children":10392},{},[10393],{"type":21,"tag":36,"props":10394,"children":10396},{"className":10395},[],[10397],{"type":27,"value":10398},"__DIR__",{"type":21,"tag":1989,"props":10400,"children":10401},{},[10402],{"type":27,"value":10403},"The directory of the file.",{"type":21,"tag":1967,"props":10405,"children":10406},{},[10407,10416],{"type":21,"tag":1989,"props":10408,"children":10409},{},[10410],{"type":21,"tag":36,"props":10411,"children":10413},{"className":10412},[],[10414],{"type":27,"value":10415},"__FUNCTION__",{"type":21,"tag":1989,"props":10417,"children":10418},{},[10419],{"type":27,"value":10420},"The name of the current function.",{"type":21,"tag":1967,"props":10422,"children":10423},{},[10424,10433],{"type":21,"tag":1989,"props":10425,"children":10426},{},[10427],{"type":21,"tag":36,"props":10428,"children":10430},{"className":10429},[],[10431],{"type":27,"value":10432},"__CLASS__",{"type":21,"tag":1989,"props":10434,"children":10435},{},[10436],{"type":27,"value":10437},"The name of the current class.",{"type":21,"tag":1967,"props":10439,"children":10440},{},[10441,10450],{"type":21,"tag":1989,"props":10442,"children":10443},{},[10444],{"type":21,"tag":36,"props":10445,"children":10447},{"className":10446},[],[10448],{"type":27,"value":10449},"__METHOD__",{"type":21,"tag":1989,"props":10451,"children":10452},{},[10453],{"type":27,"value":10454},"The name of the current method.",{"type":21,"tag":1967,"props":10456,"children":10457},{},[10458,10467],{"type":21,"tag":1989,"props":10459,"children":10460},{},[10461],{"type":21,"tag":36,"props":10462,"children":10464},{"className":10463},[],[10465],{"type":27,"value":10466},"__NAMESPACE__",{"type":21,"tag":1989,"props":10468,"children":10469},{},[10470],{"type":27,"value":10471},"The name of the current namespace.",{"type":21,"tag":53,"props":10473,"children":10475},{"className":55,"code":10474,"language":12,"meta":8,"style":8},"echo \"This is line number: \" . __LINE__; \u002F\u002F Outputs the current line number\n\necho \"This file is located at: \" . __FILE__; \u002F\u002F Outputs the full path and filename of the file\n\necho \"This directory is: \" . __DIR__; \u002F\u002F Outputs the directory of the file\n",[10476],{"type":21,"tag":36,"props":10477,"children":10478},{"__ignoreMap":8},[10479,10509,10516,10546,10553],{"type":21,"tag":62,"props":10480,"children":10481},{"class":64,"line":65},[10482,10486,10491,10495,10500,10504],{"type":21,"tag":62,"props":10483,"children":10484},{"style":91},[10485],{"type":27,"value":1008},{"type":21,"tag":62,"props":10487,"children":10488},{"style":102},[10489],{"type":27,"value":10490}," \"This is line number: \"",{"type":21,"tag":62,"props":10492,"children":10493},{"style":85},[10494],{"type":27,"value":1893},{"type":21,"tag":62,"props":10496,"children":10497},{"style":91},[10498],{"type":27,"value":10499}," __LINE__",{"type":21,"tag":62,"props":10501,"children":10502},{"style":79},[10503],{"type":27,"value":1571},{"type":21,"tag":62,"props":10505,"children":10506},{"style":69},[10507],{"type":27,"value":10508},"\u002F\u002F Outputs the current line number\n",{"type":21,"tag":62,"props":10510,"children":10511},{"class":64,"line":75},[10512],{"type":21,"tag":62,"props":10513,"children":10514},{"emptyLinePlaceholder":136},[10515],{"type":27,"value":139},{"type":21,"tag":62,"props":10517,"children":10518},{"class":64,"line":132},[10519,10523,10528,10532,10537,10541],{"type":21,"tag":62,"props":10520,"children":10521},{"style":91},[10522],{"type":27,"value":1008},{"type":21,"tag":62,"props":10524,"children":10525},{"style":102},[10526],{"type":27,"value":10527}," \"This file is located at: \"",{"type":21,"tag":62,"props":10529,"children":10530},{"style":85},[10531],{"type":27,"value":1893},{"type":21,"tag":62,"props":10533,"children":10534},{"style":91},[10535],{"type":27,"value":10536}," __FILE__",{"type":21,"tag":62,"props":10538,"children":10539},{"style":79},[10540],{"type":27,"value":1571},{"type":21,"tag":62,"props":10542,"children":10543},{"style":69},[10544],{"type":27,"value":10545},"\u002F\u002F Outputs the full path and filename of the file\n",{"type":21,"tag":62,"props":10547,"children":10548},{"class":64,"line":142},[10549],{"type":21,"tag":62,"props":10550,"children":10551},{"emptyLinePlaceholder":136},[10552],{"type":27,"value":139},{"type":21,"tag":62,"props":10554,"children":10555},{"class":64,"line":151},[10556,10560,10565,10569,10574,10578],{"type":21,"tag":62,"props":10557,"children":10558},{"style":91},[10559],{"type":27,"value":1008},{"type":21,"tag":62,"props":10561,"children":10562},{"style":102},[10563],{"type":27,"value":10564}," \"This directory is: \"",{"type":21,"tag":62,"props":10566,"children":10567},{"style":85},[10568],{"type":27,"value":1893},{"type":21,"tag":62,"props":10570,"children":10571},{"style":91},[10572],{"type":27,"value":10573}," __DIR__",{"type":21,"tag":62,"props":10575,"children":10576},{"style":79},[10577],{"type":27,"value":1571},{"type":21,"tag":62,"props":10579,"children":10580},{"style":69},[10581],{"type":27,"value":10582},"\u002F\u002F Outputs the directory of the file\n",{"type":21,"tag":22,"props":10584,"children":10586},{"id":10585},"variable-scope",[10587],{"type":27,"value":10588},"Variable Scope",{"type":21,"tag":30,"props":10590,"children":10591},{},[10592],{"type":27,"value":10593},"In PHP, variable scope refers to the context within which a variable is defined and can be accessed. The main types of variable scope in PHP are:",{"type":21,"tag":1959,"props":10595,"children":10596},{},[10597,10612],{"type":21,"tag":1963,"props":10598,"children":10599},{},[10600],{"type":21,"tag":1967,"props":10601,"children":10602},{},[10603,10608],{"type":21,"tag":1971,"props":10604,"children":10605},{},[10606],{"type":27,"value":10607},"Scope",{"type":21,"tag":1971,"props":10609,"children":10610},{},[10611],{"type":27,"value":1980},{"type":21,"tag":1982,"props":10613,"children":10614},{},[10615,10628,10641,10654],{"type":21,"tag":1967,"props":10616,"children":10617},{},[10618,10623],{"type":21,"tag":1989,"props":10619,"children":10620},{},[10621],{"type":27,"value":10622},"Local Scope",{"type":21,"tag":1989,"props":10624,"children":10625},{},[10626],{"type":27,"value":10627},"Variables defined within a function are only accessible within that function.",{"type":21,"tag":1967,"props":10629,"children":10630},{},[10631,10636],{"type":21,"tag":1989,"props":10632,"children":10633},{},[10634],{"type":27,"value":10635},"Global Scope",{"type":21,"tag":1989,"props":10637,"children":10638},{},[10639],{"type":27,"value":10640},"Variables defined outside of any function are accessible throughout the script, but not within functions unless declared as global.",{"type":21,"tag":1967,"props":10642,"children":10643},{},[10644,10649],{"type":21,"tag":1989,"props":10645,"children":10646},{},[10647],{"type":27,"value":10648},"Static Scope",{"type":21,"tag":1989,"props":10650,"children":10651},{},[10652],{"type":27,"value":10653},"Variables declared as static within a function retain their value between function calls.",{"type":21,"tag":1967,"props":10655,"children":10656},{},[10657,10662],{"type":21,"tag":1989,"props":10658,"children":10659},{},[10660],{"type":27,"value":10661},"Function Parameters",{"type":21,"tag":1989,"props":10663,"children":10664},{},[10665],{"type":27,"value":10666},"Variables passed as parameters to a function are only accessible within that function.",{"type":21,"tag":53,"props":10668,"children":10670},{"className":55,"code":10669,"language":12,"meta":8,"style":8},"function localScope() {\n    $localVar = \"I am a local variable\";\n    echo $localVar; \u002F\u002F Outputs: I am a local variable\n}\nlocalScope();\n\u002F\u002F echo $localVar; \u002F\u002F This will cause an error because $localVar is not accessible outside the function\n",[10671],{"type":21,"tag":36,"props":10672,"children":10673},{"__ignoreMap":8},[10674,10690,10711,10728,10735,10747],{"type":21,"tag":62,"props":10675,"children":10676},{"class":64,"line":65},[10677,10681,10686],{"type":21,"tag":62,"props":10678,"children":10679},{"style":85},[10680],{"type":27,"value":891},{"type":21,"tag":62,"props":10682,"children":10683},{"style":894},[10684],{"type":27,"value":10685}," localScope",{"type":21,"tag":62,"props":10687,"children":10688},{"style":79},[10689],{"type":27,"value":3453},{"type":21,"tag":62,"props":10691,"children":10692},{"class":64,"line":75},[10693,10698,10702,10707],{"type":21,"tag":62,"props":10694,"children":10695},{"style":79},[10696],{"type":27,"value":10697},"    $localVar ",{"type":21,"tag":62,"props":10699,"children":10700},{"style":85},[10701],{"type":27,"value":88},{"type":21,"tag":62,"props":10703,"children":10704},{"style":102},[10705],{"type":27,"value":10706}," \"I am a local variable\"",{"type":21,"tag":62,"props":10708,"children":10709},{"style":79},[10710],{"type":27,"value":1455},{"type":21,"tag":62,"props":10712,"children":10713},{"class":64,"line":132},[10714,10718,10723],{"type":21,"tag":62,"props":10715,"children":10716},{"style":91},[10717],{"type":27,"value":3930},{"type":21,"tag":62,"props":10719,"children":10720},{"style":79},[10721],{"type":27,"value":10722}," $localVar; ",{"type":21,"tag":62,"props":10724,"children":10725},{"style":69},[10726],{"type":27,"value":10727},"\u002F\u002F Outputs: I am a local variable\n",{"type":21,"tag":62,"props":10729,"children":10730},{"class":64,"line":142},[10731],{"type":21,"tag":62,"props":10732,"children":10733},{"style":79},[10734],{"type":27,"value":960},{"type":21,"tag":62,"props":10736,"children":10737},{"class":64,"line":151},[10738,10743],{"type":21,"tag":62,"props":10739,"children":10740},{"style":894},[10741],{"type":27,"value":10742},"localScope",{"type":21,"tag":62,"props":10744,"children":10745},{"style":79},[10746],{"type":27,"value":2342},{"type":21,"tag":62,"props":10748,"children":10749},{"class":64,"line":173},[10750],{"type":21,"tag":62,"props":10751,"children":10752},{"style":69},[10753],{"type":27,"value":10754},"\u002F\u002F echo $localVar; \u002F\u002F This will cause an error because $localVar is not accessible outside the function\n",{"type":21,"tag":53,"props":10756,"children":10758},{"className":55,"code":10757,"language":12,"meta":8,"style":8},"function staticScope() {\n    static $count = 0;\n    $count++;\n    echo $count; \u002F\u002F Outputs the number of times the function has been called\n}\nstaticScope(); \u002F\u002F Outputs: 1\nstaticScope(); \u002F\u002F Outputs: 2\nstaticScope(); \u002F\u002F Outputs: 3\n",[10759],{"type":21,"tag":36,"props":10760,"children":10761},{"__ignoreMap":8},[10762,10778,10803,10818,10835,10842,10859,10875],{"type":21,"tag":62,"props":10763,"children":10764},{"class":64,"line":65},[10765,10769,10774],{"type":21,"tag":62,"props":10766,"children":10767},{"style":85},[10768],{"type":27,"value":891},{"type":21,"tag":62,"props":10770,"children":10771},{"style":894},[10772],{"type":27,"value":10773}," staticScope",{"type":21,"tag":62,"props":10775,"children":10776},{"style":79},[10777],{"type":27,"value":3453},{"type":21,"tag":62,"props":10779,"children":10780},{"class":64,"line":75},[10781,10786,10791,10795,10799],{"type":21,"tag":62,"props":10782,"children":10783},{"style":85},[10784],{"type":27,"value":10785},"    static",{"type":21,"tag":62,"props":10787,"children":10788},{"style":79},[10789],{"type":27,"value":10790}," $count ",{"type":21,"tag":62,"props":10792,"children":10793},{"style":85},[10794],{"type":27,"value":88},{"type":21,"tag":62,"props":10796,"children":10797},{"style":91},[10798],{"type":27,"value":595},{"type":21,"tag":62,"props":10800,"children":10801},{"style":79},[10802],{"type":27,"value":1455},{"type":21,"tag":62,"props":10804,"children":10805},{"class":64,"line":132},[10806,10810,10814],{"type":21,"tag":62,"props":10807,"children":10808},{"style":79},[10809],{"type":27,"value":4964},{"type":21,"tag":62,"props":10811,"children":10812},{"style":85},[10813],{"type":27,"value":4006},{"type":21,"tag":62,"props":10815,"children":10816},{"style":79},[10817],{"type":27,"value":1455},{"type":21,"tag":62,"props":10819,"children":10820},{"class":64,"line":142},[10821,10825,10830],{"type":21,"tag":62,"props":10822,"children":10823},{"style":91},[10824],{"type":27,"value":3930},{"type":21,"tag":62,"props":10826,"children":10827},{"style":79},[10828],{"type":27,"value":10829}," $count; ",{"type":21,"tag":62,"props":10831,"children":10832},{"style":69},[10833],{"type":27,"value":10834},"\u002F\u002F Outputs the number of times the function has been called\n",{"type":21,"tag":62,"props":10836,"children":10837},{"class":64,"line":151},[10838],{"type":21,"tag":62,"props":10839,"children":10840},{"style":79},[10841],{"type":27,"value":960},{"type":21,"tag":62,"props":10843,"children":10844},{"class":64,"line":173},[10845,10850,10854],{"type":21,"tag":62,"props":10846,"children":10847},{"style":894},[10848],{"type":27,"value":10849},"staticScope",{"type":21,"tag":62,"props":10851,"children":10852},{"style":79},[10853],{"type":27,"value":3560},{"type":21,"tag":62,"props":10855,"children":10856},{"style":69},[10857],{"type":27,"value":10858},"\u002F\u002F Outputs: 1\n",{"type":21,"tag":62,"props":10860,"children":10861},{"class":64,"line":197},[10862,10866,10870],{"type":21,"tag":62,"props":10863,"children":10864},{"style":894},[10865],{"type":27,"value":10849},{"type":21,"tag":62,"props":10867,"children":10868},{"style":79},[10869],{"type":27,"value":3560},{"type":21,"tag":62,"props":10871,"children":10872},{"style":69},[10873],{"type":27,"value":10874},"\u002F\u002F Outputs: 2\n",{"type":21,"tag":62,"props":10876,"children":10877},{"class":64,"line":219},[10878,10882,10886],{"type":21,"tag":62,"props":10879,"children":10880},{"style":894},[10881],{"type":27,"value":10849},{"type":21,"tag":62,"props":10883,"children":10884},{"style":79},[10885],{"type":27,"value":3560},{"type":21,"tag":62,"props":10887,"children":10888},{"style":69},[10889],{"type":27,"value":10890},"\u002F\u002F Outputs: 3\n",{"type":21,"tag":22,"props":10892,"children":10894},{"id":10893},"global-variables",[10895],{"type":27,"value":10896},"Global Variables",{"type":21,"tag":30,"props":10898,"children":10899},{},[10900,10902,10907,10909,10915],{"type":27,"value":10901},"Global variables are defined outside of any function and can be accessed throughout the script. However, to access a global variable within a function, you need to declare it as global using the ",{"type":21,"tag":36,"props":10903,"children":10905},{"className":10904},[],[10906],{"type":27,"value":10138},{"type":27,"value":10908}," keyword or access it through the ",{"type":21,"tag":36,"props":10910,"children":10912},{"className":10911},[],[10913],{"type":27,"value":10914},"$GLOBALS",{"type":27,"value":10916}," array.",{"type":21,"tag":1260,"props":10918,"children":10920},{"id":10919},"using-global-keyword",[10921,10923,10928],{"type":27,"value":10922},"Using ",{"type":21,"tag":36,"props":10924,"children":10926},{"className":10925},[],[10927],{"type":27,"value":10138},{"type":27,"value":10929}," keyword",{"type":21,"tag":53,"props":10931,"children":10933},{"className":55,"code":10932,"language":12,"meta":8,"style":8},"$globalVar = \"I am a global variable\";\nfunction testGlobal() {\n    global $globalVar;\n    echo $globalVar; \u002F\u002F Outputs: I am a global variable\n}\ntestGlobal();\n",[10934],{"type":21,"tag":36,"props":10935,"children":10936},{"__ignoreMap":8},[10937,10958,10974,10987,11004,11011],{"type":21,"tag":62,"props":10938,"children":10939},{"class":64,"line":65},[10940,10945,10949,10954],{"type":21,"tag":62,"props":10941,"children":10942},{"style":79},[10943],{"type":27,"value":10944},"$globalVar ",{"type":21,"tag":62,"props":10946,"children":10947},{"style":85},[10948],{"type":27,"value":88},{"type":21,"tag":62,"props":10950,"children":10951},{"style":102},[10952],{"type":27,"value":10953}," \"I am a global variable\"",{"type":21,"tag":62,"props":10955,"children":10956},{"style":79},[10957],{"type":27,"value":1455},{"type":21,"tag":62,"props":10959,"children":10960},{"class":64,"line":75},[10961,10965,10970],{"type":21,"tag":62,"props":10962,"children":10963},{"style":85},[10964],{"type":27,"value":891},{"type":21,"tag":62,"props":10966,"children":10967},{"style":894},[10968],{"type":27,"value":10969}," testGlobal",{"type":21,"tag":62,"props":10971,"children":10972},{"style":79},[10973],{"type":27,"value":3453},{"type":21,"tag":62,"props":10975,"children":10976},{"class":64,"line":132},[10977,10982],{"type":21,"tag":62,"props":10978,"children":10979},{"style":85},[10980],{"type":27,"value":10981},"    global",{"type":21,"tag":62,"props":10983,"children":10984},{"style":79},[10985],{"type":27,"value":10986}," $globalVar;\n",{"type":21,"tag":62,"props":10988,"children":10989},{"class":64,"line":142},[10990,10994,10999],{"type":21,"tag":62,"props":10991,"children":10992},{"style":91},[10993],{"type":27,"value":3930},{"type":21,"tag":62,"props":10995,"children":10996},{"style":79},[10997],{"type":27,"value":10998}," $globalVar; ",{"type":21,"tag":62,"props":11000,"children":11001},{"style":69},[11002],{"type":27,"value":11003},"\u002F\u002F Outputs: I am a global variable\n",{"type":21,"tag":62,"props":11005,"children":11006},{"class":64,"line":151},[11007],{"type":21,"tag":62,"props":11008,"children":11009},{"style":79},[11010],{"type":27,"value":960},{"type":21,"tag":62,"props":11012,"children":11013},{"class":64,"line":173},[11014,11019],{"type":21,"tag":62,"props":11015,"children":11016},{"style":894},[11017],{"type":27,"value":11018},"testGlobal",{"type":21,"tag":62,"props":11020,"children":11021},{"style":79},[11022],{"type":27,"value":2342},{"type":21,"tag":1260,"props":11024,"children":11026},{"id":11025},"using-globals-array",[11027,11028,11033],{"type":27,"value":10922},{"type":21,"tag":36,"props":11029,"children":11031},{"className":11030},[],[11032],{"type":27,"value":10914},{"type":27,"value":94},{"type":21,"tag":53,"props":11035,"children":11037},{"className":55,"code":11036,"language":12,"meta":8,"style":8},"$globalVar = \"I am a global variable\";\nfunction testGlobal() {\n    echo $GLOBALS['globalVar']; \u002F\u002F Outputs: I am a global variable\n}\ntestGlobal();\n",[11038],{"type":21,"tag":36,"props":11039,"children":11040},{"__ignoreMap":8},[11041,11060,11075,11100,11107],{"type":21,"tag":62,"props":11042,"children":11043},{"class":64,"line":65},[11044,11048,11052,11056],{"type":21,"tag":62,"props":11045,"children":11046},{"style":79},[11047],{"type":27,"value":10944},{"type":21,"tag":62,"props":11049,"children":11050},{"style":85},[11051],{"type":27,"value":88},{"type":21,"tag":62,"props":11053,"children":11054},{"style":102},[11055],{"type":27,"value":10953},{"type":21,"tag":62,"props":11057,"children":11058},{"style":79},[11059],{"type":27,"value":1455},{"type":21,"tag":62,"props":11061,"children":11062},{"class":64,"line":75},[11063,11067,11071],{"type":21,"tag":62,"props":11064,"children":11065},{"style":85},[11066],{"type":27,"value":891},{"type":21,"tag":62,"props":11068,"children":11069},{"style":894},[11070],{"type":27,"value":10969},{"type":21,"tag":62,"props":11072,"children":11073},{"style":79},[11074],{"type":27,"value":3453},{"type":21,"tag":62,"props":11076,"children":11077},{"class":64,"line":132},[11078,11082,11087,11092,11096],{"type":21,"tag":62,"props":11079,"children":11080},{"style":91},[11081],{"type":27,"value":3930},{"type":21,"tag":62,"props":11083,"children":11084},{"style":79},[11085],{"type":27,"value":11086}," $GLOBALS[",{"type":21,"tag":62,"props":11088,"children":11089},{"style":102},[11090],{"type":27,"value":11091},"'globalVar'",{"type":21,"tag":62,"props":11093,"children":11094},{"style":79},[11095],{"type":27,"value":6780},{"type":21,"tag":62,"props":11097,"children":11098},{"style":69},[11099],{"type":27,"value":11003},{"type":21,"tag":62,"props":11101,"children":11102},{"class":64,"line":142},[11103],{"type":21,"tag":62,"props":11104,"children":11105},{"style":79},[11106],{"type":27,"value":960},{"type":21,"tag":62,"props":11108,"children":11109},{"class":64,"line":151},[11110,11114],{"type":21,"tag":62,"props":11111,"children":11112},{"style":894},[11113],{"type":27,"value":11018},{"type":21,"tag":62,"props":11115,"children":11116},{"style":79},[11117],{"type":27,"value":2342},{"type":21,"tag":22,"props":11119,"children":11121},{"id":11120},"superglobals",[11122],{"type":27,"value":11123},"Superglobals",{"type":21,"tag":30,"props":11125,"children":11126},{},[11127],{"type":27,"value":11128},"PHP also provides several predefined superglobal variables that are available in all scopes throughout a script. Some common superglobals include:",{"type":21,"tag":1959,"props":11130,"children":11131},{},[11132,11147],{"type":21,"tag":1963,"props":11133,"children":11134},{},[11135],{"type":21,"tag":1967,"props":11136,"children":11137},{},[11138,11143],{"type":21,"tag":1971,"props":11139,"children":11140},{},[11141],{"type":27,"value":11142},"Superglobal",{"type":21,"tag":1971,"props":11144,"children":11145},{},[11146],{"type":27,"value":1980},{"type":21,"tag":1982,"props":11148,"children":11149},{},[11150,11166,11182,11199,11216,11232,11249],{"type":21,"tag":1967,"props":11151,"children":11152},{},[11153,11161],{"type":21,"tag":1989,"props":11154,"children":11155},{},[11156],{"type":21,"tag":36,"props":11157,"children":11159},{"className":11158},[],[11160],{"type":27,"value":9519},{"type":21,"tag":1989,"props":11162,"children":11163},{},[11164],{"type":27,"value":11165},"An associative array of variables passed to the current script via the URL parameters.",{"type":21,"tag":1967,"props":11167,"children":11168},{},[11169,11177],{"type":21,"tag":1989,"props":11170,"children":11171},{},[11172],{"type":21,"tag":36,"props":11173,"children":11175},{"className":11174},[],[11176],{"type":27,"value":9526},{"type":21,"tag":1989,"props":11178,"children":11179},{},[11180],{"type":27,"value":11181},"An associative array of variables passed to the current script via the HTTP POST method.",{"type":21,"tag":1967,"props":11183,"children":11184},{},[11185,11194],{"type":21,"tag":1989,"props":11186,"children":11187},{},[11188],{"type":21,"tag":36,"props":11189,"children":11191},{"className":11190},[],[11192],{"type":27,"value":11193},"$_SERVER",{"type":21,"tag":1989,"props":11195,"children":11196},{},[11197],{"type":27,"value":11198},"An array containing information about headers, paths, and script locations.",{"type":21,"tag":1967,"props":11200,"children":11201},{},[11202,11211],{"type":21,"tag":1989,"props":11203,"children":11204},{},[11205],{"type":21,"tag":36,"props":11206,"children":11208},{"className":11207},[],[11209],{"type":27,"value":11210},"$_SESSION",{"type":21,"tag":1989,"props":11212,"children":11213},{},[11214],{"type":27,"value":11215},"An associative array containing session variables available to the current script.",{"type":21,"tag":1967,"props":11217,"children":11218},{},[11219,11227],{"type":21,"tag":1989,"props":11220,"children":11221},{},[11222],{"type":21,"tag":36,"props":11223,"children":11225},{"className":11224},[],[11226],{"type":27,"value":9848},{"type":21,"tag":1989,"props":11228,"children":11229},{},[11230],{"type":27,"value":11231},"An associative array of variables passed to the current script via HTTP cookies.",{"type":21,"tag":1967,"props":11233,"children":11234},{},[11235,11244],{"type":21,"tag":1989,"props":11236,"children":11237},{},[11238],{"type":21,"tag":36,"props":11239,"children":11241},{"className":11240},[],[11242],{"type":27,"value":11243},"$_FILES",{"type":21,"tag":1989,"props":11245,"children":11246},{},[11247],{"type":27,"value":11248},"An associative array of items uploaded to the current script via the HTTP POST method.",{"type":21,"tag":1967,"props":11250,"children":11251},{},[11252,11260],{"type":21,"tag":1989,"props":11253,"children":11254},{},[11255],{"type":21,"tag":36,"props":11256,"children":11258},{"className":11257},[],[11259],{"type":27,"value":9533},{"type":21,"tag":1989,"props":11261,"children":11262},{},[11263,11265,11270,11271,11276,11277,11282],{"type":27,"value":11264},"An associative array that by default contains the contents of ",{"type":21,"tag":36,"props":11266,"children":11268},{"className":11267},[],[11269],{"type":27,"value":9519},{"type":27,"value":110},{"type":21,"tag":36,"props":11272,"children":11274},{"className":11273},[],[11275],{"type":27,"value":9526},{"type":27,"value":9299},{"type":21,"tag":36,"props":11278,"children":11280},{"className":11279},[],[11281],{"type":27,"value":9848},{"type":27,"value":1426},{"type":21,"tag":53,"props":11284,"children":11286},{"className":55,"code":11285,"language":12,"meta":8,"style":8},"\u002F\u002F Example of using superglobals\necho $_SERVER['HTTP_USER_AGENT']; \u002F\u002F Outputs the user agent string of the browser\n\n\u002F\u002F Example of using $_GET\n\u002F\u002F If the URL is http:\u002F\u002Fexample.com\u002F?name=John\necho $_GET['name']; \u002F\u002F Outputs: John\n\n\u002F\u002F Example of using $_POST\n\u002F\u002F If a form is submitted with a field named 'email'\necho $_POST['email']; \u002F\u002F Outputs the submitted email address\n",[11287],{"type":21,"tag":36,"props":11288,"children":11289},{"__ignoreMap":8},[11290,11298,11324,11331,11339,11347,11371,11378,11386,11394],{"type":21,"tag":62,"props":11291,"children":11292},{"class":64,"line":65},[11293],{"type":21,"tag":62,"props":11294,"children":11295},{"style":69},[11296],{"type":27,"value":11297},"\u002F\u002F Example of using superglobals\n",{"type":21,"tag":62,"props":11299,"children":11300},{"class":64,"line":75},[11301,11305,11310,11315,11319],{"type":21,"tag":62,"props":11302,"children":11303},{"style":91},[11304],{"type":27,"value":1008},{"type":21,"tag":62,"props":11306,"children":11307},{"style":79},[11308],{"type":27,"value":11309}," $_SERVER[",{"type":21,"tag":62,"props":11311,"children":11312},{"style":102},[11313],{"type":27,"value":11314},"'HTTP_USER_AGENT'",{"type":21,"tag":62,"props":11316,"children":11317},{"style":79},[11318],{"type":27,"value":6780},{"type":21,"tag":62,"props":11320,"children":11321},{"style":69},[11322],{"type":27,"value":11323},"\u002F\u002F Outputs the user agent string of the browser\n",{"type":21,"tag":62,"props":11325,"children":11326},{"class":64,"line":132},[11327],{"type":21,"tag":62,"props":11328,"children":11329},{"emptyLinePlaceholder":136},[11330],{"type":27,"value":139},{"type":21,"tag":62,"props":11332,"children":11333},{"class":64,"line":142},[11334],{"type":21,"tag":62,"props":11335,"children":11336},{"style":69},[11337],{"type":27,"value":11338},"\u002F\u002F Example of using $_GET\n",{"type":21,"tag":62,"props":11340,"children":11341},{"class":64,"line":151},[11342],{"type":21,"tag":62,"props":11343,"children":11344},{"style":69},[11345],{"type":27,"value":11346},"\u002F\u002F If the URL is http:\u002F\u002Fexample.com\u002F?name=John\n",{"type":21,"tag":62,"props":11348,"children":11349},{"class":64,"line":173},[11350,11354,11358,11362,11366],{"type":21,"tag":62,"props":11351,"children":11352},{"style":91},[11353],{"type":27,"value":1008},{"type":21,"tag":62,"props":11355,"children":11356},{"style":79},[11357],{"type":27,"value":8806},{"type":21,"tag":62,"props":11359,"children":11360},{"style":102},[11361],{"type":27,"value":662},{"type":21,"tag":62,"props":11363,"children":11364},{"style":79},[11365],{"type":27,"value":6780},{"type":21,"tag":62,"props":11367,"children":11368},{"style":69},[11369],{"type":27,"value":11370},"\u002F\u002F Outputs: John\n",{"type":21,"tag":62,"props":11372,"children":11373},{"class":64,"line":197},[11374],{"type":21,"tag":62,"props":11375,"children":11376},{"emptyLinePlaceholder":136},[11377],{"type":27,"value":139},{"type":21,"tag":62,"props":11379,"children":11380},{"class":64,"line":219},[11381],{"type":21,"tag":62,"props":11382,"children":11383},{"style":69},[11384],{"type":27,"value":11385},"\u002F\u002F Example of using $_POST\n",{"type":21,"tag":62,"props":11387,"children":11388},{"class":64,"line":16},[11389],{"type":21,"tag":62,"props":11390,"children":11391},{"style":69},[11392],{"type":27,"value":11393},"\u002F\u002F If a form is submitted with a field named 'email'\n",{"type":21,"tag":62,"props":11395,"children":11396},{"class":64,"line":244},[11397,11401,11405,11410,11414],{"type":21,"tag":62,"props":11398,"children":11399},{"style":91},[11400],{"type":27,"value":1008},{"type":21,"tag":62,"props":11402,"children":11403},{"style":79},[11404],{"type":27,"value":9763},{"type":21,"tag":62,"props":11406,"children":11407},{"style":102},[11408],{"type":27,"value":11409},"'email'",{"type":21,"tag":62,"props":11411,"children":11412},{"style":79},[11413],{"type":27,"value":6780},{"type":21,"tag":62,"props":11415,"children":11416},{"style":69},[11417],{"type":27,"value":11418},"\u002F\u002F Outputs the submitted email address\n",{"type":21,"tag":1221,"props":11420,"children":11421},{},[11422],{"type":27,"value":1225},{"title":8,"searchDepth":132,"depth":132,"links":11424},[11425,11426,11427,11428,11429,11435],{"id":10134,"depth":75,"text":10147},{"id":10135,"depth":75,"text":10230},{"id":10323,"depth":75,"text":10326},{"id":10585,"depth":75,"text":10588},{"id":10893,"depth":75,"text":10896,"children":11430},[11431,11433],{"id":10919,"depth":132,"text":11432},"Using global keyword",{"id":11025,"depth":132,"text":11434},"Using $GLOBALS array",{"id":11120,"depth":75,"text":11123},"content:php:php-fundamental:variables.md","php\u002Fphp-fundamental\u002Fvariables.md","php\u002Fphp-fundamental\u002Fvariables",[11440,11443,11446,11449,11452,11455,11457,11460,11463,11466,11469,11473,11476,11479,11482,11485,11488,11491,11494,11497,11500,11503,11506,11507,11508,11509,11510,11511,11512,11513,11514,11515,11516,11517,11518,11521,11524],{"_path":11441,"title":11442,"weight":65},"\u002Fcpp","C++ \u002F CPP",{"_path":11444,"title":11445,"weight":244},"\u002Fdata-structure-algorithm\u002Farray-manipulation\u002Ffor-looping","For Looping in Python",{"_path":11447,"title":11448,"weight":244},"\u002Fdata-structure-algorithm\u002Farray-manipulation\u002Fwhile-looping","While Looping in Python",{"_path":11450,"title":11451,"weight":132},"\u002Fdata-structure-algorithm\u002Fassignments","Assignments",{"_path":11453,"title":11454,"weight":65},"\u002Fdata-structure-algorithm\u002Fbuzzword","Buzzword List DSA",{"_path":11456,"title":1952,"weight":75},"\u002Fdata-structure-algorithm\u002Fdata-type",{"_path":11458,"title":11459,"weight":244},"\u002Fdata-structure-algorithm\u002Fhash-map","Hash Map",{"_path":11461,"title":11462,"weight":65},"\u002Fdata-structure-algorithm\u002Finput-output","Input and Output",{"_path":11464,"title":11465,"weight":5000},"\u002Fdata-structure-algorithm\u002Fmath-library\u002Fsum","Sum Elements",{"_path":11467,"title":11468,"weight":244},"\u002Fdata-structure-algorithm\u002Fmath-library\u002Fsummary","Summary",{"_path":11470,"title":11471,"weight":11472},"\u002Fdocker\u002Fcheat-sheets","Docker Cheat Sheets",100,{"_path":11474,"title":11475,"weight":5000},"\u002Fdocker\u002Fdocker-dasar\u002Fdocker-container","Docker Container",{"_path":11477,"title":11478,"weight":5033},"\u002Fdocker\u002Fdocker-dasar\u002Fdocker-execution","Docker Execution",{"_path":11480,"title":11481,"weight":5020},"\u002Fdocker\u002Fdocker-dasar\u002Fdocker-image","Docker Image",{"_path":11483,"title":11484,"weight":5045},"\u002Fdocker\u002Fdocker-dasar\u002Fdocker-logging","Docker Logging",{"_path":11486,"title":11487,"weight":244},"\u002Fdocker\u002Fdocker-prerequisites\u002Fdocker-installation","Docker Installation",{"_path":11489,"title":11490,"weight":65},"\u002Fdocker\u002Fresources","Docker Resources",{"_path":11492,"title":11493,"weight":65},"\u002Fjava","Java",{"_path":11495,"title":11496},"\u002Fjavascript\u002Fpromises","Promise Patterns",{"_path":11498,"title":11499,"weight":65},"\u002Fjenkins","Jenkins",{"_path":11501,"title":11502,"weight":65},"\u002Fphp\u002Farrays","PHP Array Functions",{"_path":11504,"title":11505},"\u002Fphp\u002Fpatterns\u002Fsingleton","Singleton Pattern",{"_path":5,"title":9,"weight":16},{"_path":1241,"title":1242,"weight":173},{"_path":1620,"title":1621,"weight":132},{"_path":1940,"title":1941,"weight":151},{"_path":3682,"title":3683,"weight":219},{"_path":4222,"title":4223,"weight":244},{"_path":5568,"title":5569,"weight":252},{"_path":6920,"title":6921,"weight":261},{"_path":7111,"title":7112,"weight":65},{"_path":7257,"title":7258,"weight":197},{"_path":9267,"title":9268,"weight":75},{"_path":10130,"title":10131,"weight":142},{"_path":11519,"title":11520,"weight":75},"\u002Fphp\u002Freferences","PHP References (&)",{"_path":11522,"title":11523,"weight":65},"\u002Fpython","Python",{"_path":11525,"title":11526,"weight":65},"\u002Frust","Rust",[11528,11532,11535,11537,11539,11544,11546,11548,11550,11552,11554,11559,11561,11563,11565,11567,11569,11571,11574,11579,11584,11586,11589,11591,11593,11595,11597,11599,11601,11603,11605,11607,11609,11611,11613,11615,11617],{"tags":11529},[11530,11531],"cpp","c++",{"tags":11533},[11534,13,14],"python",{"tags":11536},[11534,13,14],{"tags":11538},[11534,13],{"tags":11540},[11541,11542,11543],"dsa","algorithms","data-structures",{"tags":11545},[11534,13],{"tags":11547},[11534,13],{"tags":11549},[11534,13],{"tags":11551},[11534,13,14],{"tags":11553},[11534,13,14],{"tags":11555},[11556,11557,11558],"docker","devops","infrastructure",{"tags":11560},[11556,11557,11558],{"tags":11562},[11556,11557,11558],{"tags":11564},[11556,11557,11558],{"tags":11566},[11556,11557,11558],{"tags":11568},[11556,11557,11558],{"tags":11570},[11556,11557,11558],{"tags":11572},[11573],"java",{"tags":11575},[11576,11577,11578],"javascript","frontend","async",{"tags":11580},[11581,11582,11583],"jenkins","ci","cd",{"tags":11585},[12,13,14],{"tags":11587},[12,11588,13],"patterns",{"tags":11590},[12,13,14],{"tags":11592},[12,13,1245,1246],{"tags":11594},[12,13,1624],{"tags":11596},[12,13,1944],{"tags":11598},[12,13,3686,3687,3688],{"tags":11600},[12,13,4226],{"tags":11602},[12,13,5572],{"tags":11604},[12,13,6924,6925],{"tags":11606},[12,13,7115],{"tags":11608},[12,13,7261],{"tags":11610},[12,13,9271,9272],{"tags":11612},[12,13,10134,10135,10136,10137,10138,10139,10140],{"tags":11614},[12,13],{"tags":11616},[11534],{"tags":11618},[11619],"rust",1780160028026]