[{"data":1,"prerenderedAt":4670},["ShallowReactive",2],{"content-page:\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript":3,"content-page-quiz:none":1986,"book-module-total-pages":1987,"content-section-pages:\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F":1988,"content-directory-pages:\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript":4669},{"id":4,"title":5,"audience":6,"body":7,"contentType":1962,"course":1963,"description":1964,"estimateBasis":1965,"estimatedDiscussionMinutes":1966,"estimatedLiveMinutes":1967,"estimatedTotalMinutes":1968,"extension":1969,"meta":1970,"module":14,"navigation":1971,"order":1972,"path":1973,"promptAssist":1974,"seo":1975,"status":1976,"stem":1977,"tags":1978,"videoDuration":1981,"videoId":1982,"videoLink":1983,"videoTitle":1984,"week":14,"__hash__":1985},"content\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript.md","Compare PHP And JavaScript","student",{"type":8,"value":9,"toc":1926},"minimark",[10,38,82,119,183,254,264,332,399,485,540,629,686,733,834,894,950,1009,1073,1118,1185,1350,1428,1454,1499,1541,1583,1617,1650,1668,1723,1786,1816],[11,12,15,19],"slide",{"id":13,"level":14},"main-idea","2",[16,17,18],"h2",{"id":13},"Main Idea",[20,21,22,26,29,32,35],"ul",{},[23,24,25],"li",{},"PHP and JavaScript share programming ideas",[23,27,28],{},"PHP runs on the server; JavaScript usually runs in the browser",[23,30,31],{},"Output appears in different places depending on where the code runs",[23,33,34],{},"Types, variables, arrays, and operators look similar but have important differences",[23,36,37],{},"Error messages usually give a file, line, and clue before you change code",[11,39,41,44],{"id":40,"level":14},"practice-workspace",[16,42,43],{"id":40},"Practice Workspace",[20,45,46,53,59,62,72,75],{},[23,47,48,49],{},"Work inside ",[50,51,52],"code",{},"public_html\u002Fm02\u002Flessons\u002F",[23,54,55,56],{},"Lesson branch: ",[50,57,58],{},"Module02-PHP-vs-JS",[23,60,61],{},"Create the folder if it is missing",[23,63,64,65,68,69],{},"Use file prefix ",[50,66,67],{},"php-js-",", such as ",[50,70,71],{},"php-js-type-check.php",[23,73,74],{},"Keep each practice file small enough to debug directly",[23,76,77,78,81],{},"After a working change: run ",[50,79,80],{},"git status",", stage the changed files, and commit",[11,83,85,88,92,116],{"id":84,"level":14},"lesson-path",[16,86,87],{"id":84},"Lesson Path",[89,90,91],"p",{},"This presentation compares the same programming ideas in both languages:",[93,94,95,98,101,104,107,110,113],"ol",{},[23,96,97],{},"Where code runs",[23,99,100],{},"Comments",[23,102,103],{},"Output and inspection tools",[23,105,106],{},"Variables and scope",[23,108,109],{},"Data types and examples",[23,111,112],{},"Operators and comparisons",[23,114,115],{},"Beginner PHP error reading",[89,117,118],{},"Loops, conditions, and functions continue in the next presentation.",[11,120,122,126,180],{"id":121,"level":14},"server-vs-browser",[16,123,125],{"id":124},"server-code-and-browser-code","Server Code And Browser Code",[127,128,131,157],"two-col",{"gap":129,"left-width":130,"right-width":130},"lg","1fr",[132,133,135,140],"template",{"v-slot:left":134},"",[136,137,139],"h3",{"id":138},"php","PHP",[20,141,142,145,148,151,154],{},[23,143,144],{},"Runs on the server",[23,146,147],{},"Can read server files",[23,149,150],{},"Can connect to a database, such as MySQL",[23,152,153],{},"Builds HTML, JSON, or redirects",[23,155,156],{},"Output becomes part of the response",[132,158,159,163],{"v-slot:right":134},[136,160,162],{"id":161},"javascript","JavaScript",[20,164,165,168,171,174,177],{},[23,166,167],{},"Usually runs in the browser",[23,169,170],{},"Reacts to clicks and inputs",[23,172,173],{},"Can update the page after it loads",[23,175,176],{},"Can send later requests to the server",[23,178,179],{},"Output usually appears in DevTools Console unless it changes the page",[89,181,182],{},"Quick rule: server-side code prepares the response; browser-side code works with the response.",[11,184,186,189],{"id":185,"level":14},"where-code-lives",[16,187,188],{"id":185},"Where Code Lives",[127,190,191,225],{"gap":129,"left-width":130,"right-width":130},[132,192,193,197,201],{"v-slot:left":134},[136,194,196],{"id":195},"php-page","PHP Page",[198,199],"code-snippet",{"language":138,"src":200},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fwhere-code-lives-10.php",[20,202,203,209,215,222],{},[23,204,205,206],{},"File normally ends in ",[50,207,208],{},".php",[23,210,211,214],{},[50,212,213],{},"\u003C?php"," starts PHP mode inside the file",[23,216,217,218,221],{},"Closing ",[50,219,220],{},"?>"," is needed when a file switches from PHP back to HTML",[23,223,224],{},"The server executes PHP before the browser sees the response",[132,226,227,231,235],{"v-slot:right":134},[136,228,230],{"id":229},"javascript-page","JavaScript Page",[198,232],{"language":233,"src":234},"html","\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fwhere-code-lives-11.html",[20,236,237,248,251],{},[23,238,239,240,243,244,247],{},"JavaScript can live in a ",[50,241,242],{},"\u003Cscript>"," tag or separate ",[50,245,246],{},".js"," file",[23,249,250],{},"The browser runs it after the page reaches the user",[23,252,253],{},"Console output appears in DevTools, not in the page body",[11,255,257,260],{"id":256,"level":14},"request-flow",[16,258,259],{"id":256},"Request Flow",[261,262],"mermaid",{"code":263},"sequenceDiagram\n  participant Browser\n  participant WebServer as Web Server\n  participant PHP as Server-side Code\n  participant DB as Database\n  Browser->>WebServer: GET \u002Fm02\u002Flessons\u002Fphp-js-type-check.php\n  WebServer->>PHP: Run PHP file\n  PHP-->>DB: Optional data work\n  PHP-->>WebServer: Finished response\n  WebServer-->>Browser: HTML or JSON\n  Browser->>Browser: Run JavaScript\n",[11,265,267,270,273,276],{"id":266,"level":14},"php-syntax-first",[16,268,269],{"id":266},"PHP Syntax First",[198,271],{"language":138,"src":272},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fphp-syntax-first-08.php",[89,274,275],{},"Required pieces:",[127,277,278,307],{"gap":129,"left-width":130,"right-width":130},[132,279,280],{"v-slot:left":134},[20,281,282,287,298,304],{},[23,283,284,286],{},[50,285,213],{},": starts PHP mode",[23,288,289,292,293],{},[50,290,291],{},"$",": starts a variable name",[20,294,295],{},[23,296,297],{},"This tells PHP the next name is a variable, not plain text, a keyword, or a function name",[23,299,300,303],{},[50,301,302],{},";",": ends a PHP statement",[23,305,306],{},"Variable names are case-sensitive",[132,308,309,315,329],{"v-slot:right":134},[23,310,311,312,314],{},"Save the file as ",[50,313,208],{}," so server-side code can run",[23,316,317,318,320,321],{},"Omit the closing ",[50,319,220],{}," when a file contains only PHP\n",[20,322,323],{},[23,324,325,326,328],{},"Use ",[50,327,220],{}," only when switching back to HTML in the same file",[23,330,331],{},"Raw PHP tags in the browser usually mean the file was opened directly or not served as PHP",[11,333,335,337,396],{"id":334,"level":14},"comments",[16,336,100],{"id":334},[127,338,339,373],{"gap":129,"left-width":130,"right-width":130},[132,340,341,344,347],{"v-slot:left":134},[136,342,139],{"id":343},"php-1",[198,345],{"language":138,"src":346},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fcomments-16.php",[20,348,349,355,361,367],{},[23,350,351,354],{},[50,352,353],{},"\u002F\u002F",": single-line comment",[23,356,357,360],{},[50,358,359],{},"#",": PHP single-line comment",[23,362,363,366],{},[50,364,365],{},"\u002F* ... *\u002F",": block comment",[23,368,369,372],{},[50,370,371],{},"\u002F** ... *\u002F",": documentation style",[132,374,375,378,382],{"v-slot:right":134},[136,376,162],{"id":377},"javascript-1",[198,379],{"language":380,"src":381},"js","\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fcomments-17.js",[20,383,384,388,392],{},[23,385,386,354],{},[50,387,353],{},[23,389,390,366],{},[50,391,365],{},[23,393,394,372],{},[50,395,371],{},[89,397,398],{},"Block comments can't be nested in either language.",[11,400,402,406],{"id":401,"level":14},"output-tools",[16,403,405],{"id":404},"output-and-inspection-tools","Output And Inspection Tools",[127,407,408,447],{"gap":129,"left-width":130,"right-width":130},[132,409,410,414,417],{"v-slot:left":134},[136,411,413],{"id":412},"php-checks","PHP Checks",[198,415],{"language":138,"src":416},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fphp-checks-01.php",[20,418,419,429,435,441],{},[23,420,421,424,425,428],{},[50,422,423],{},"echo"," \u002F ",[50,426,427],{},"print",": send simple text into the response",[23,430,431,434],{},[50,432,433],{},"var_export()",": show array keys and values clearly",[23,436,437,440],{},[50,438,439],{},"var_dump()",": show type, size, and value",[23,442,325,443,446],{},[50,444,445],{},"\u003Cpre>"," when debug output needs line breaks",[132,448,449,453,456],{"v-slot:right":134},[136,450,452],{"id":451},"javascript-checks","JavaScript Checks",[198,454],{"language":380,"src":455},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fjavascript-checks-02.js",[20,457,458,464,470,473,479],{},[23,459,460,463],{},[50,461,462],{},"console.log()",": inspect values",[23,465,466,469],{},[50,467,468],{},"console.table()",": inspect arrays or objects in table form",[23,471,472],{},"Open DevTools before judging behavior",[23,474,475,476],{},"Windows\u002FLinux: ",[50,477,478],{},"Ctrl+Shift+J",[23,480,481,482],{},"On macOS: ",[50,483,484],{},"Cmd+Option+J",[11,486,488,492],{"id":487,"level":14},"inspection-output-tools",[16,489,491],{"id":490},"why-inspection-tools-help","Why Inspection Tools Help",[127,493,494,513],{"gap":129,"left-width":130,"right-width":130},[132,495,496,499,502],{"v-slot:left":134},[89,497,498],{},"Snippet:",[198,500],{"language":138,"src":501},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Finspection-output-tools-06.php",[89,503,504,506,507,509,510,512],{},[50,505,433],{}," and ",[50,508,439],{}," show details ",[50,511,423],{}," cannot show clearly:",[132,514,515,518,522],{"v-slot:right":134},[89,516,517],{},"Expected output:",[198,519],{"language":520,"src":521},"text","\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Finspection-output-tools-07.txt",[20,523,524,529,535],{},[23,525,526,528],{},[50,527,423],{}," can display a value, but it hides structure",[23,530,531,532,534],{},"Arrays need an inspection tool because ",[50,533,423],{}," cannot show array keys, indexes, or nested values",[23,536,537,539],{},[50,538,439],{}," is best when type confusion is possible",[11,541,543,546],{"id":542,"level":14},"defining-variables",[16,544,545],{"id":542},"Defining Variables",[127,547,548,587],{"gap":129,"left-width":130,"right-width":130},[132,549,550,553,556],{"v-slot:left":134},[136,551,139],{"id":552},"php-2",[198,554],{"language":138,"src":555},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fdefining-variables-23.php",[20,557,558,563,566,571,581],{},[23,559,560,561],{},"Variable names start with ",[50,562,291],{},[23,564,565],{},"Names can contain letters, numbers, and underscores",[23,567,568,569],{},"Names cannot start with a number after ",[50,570,291],{},[23,572,573,574,506,577,580],{},"Case matters: ",[50,575,576],{},"$name",[50,578,579],{},"$Name"," are different",[23,582,583,586],{},[50,584,585],{},"snake_case"," is common in beginner PHP examples",[132,588,589,592,595],{"v-slot:right":134},[136,590,162],{"id":591},"javascript-2",[198,593],{"language":380,"src":594},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fdefining-variables-24.js",[20,596,597,600,606,612,618,626],{},[23,598,599],{},"Variables use a keyword before the name",[23,601,602,605],{},[50,603,604],{},"let",": value may change",[23,607,608,611],{},[50,609,610],{},"const",": value cannot be reassigned",[23,613,614,617],{},[50,615,616],{},"var",": older keyword; avoid in new beginner code",[23,619,573,620,506,623,580],{},[50,621,622],{},"name",[50,624,625],{},"Name",[23,627,628],{},"See the below slide for the scope differences between these keywords",[11,630,633,637],{"id":631,"level":632},"variable-scope-keywords","3",[16,634,636],{"id":635},"javascript-scope-keywords","JavaScript Scope Keywords",[127,638,641,646],{"gap":129,"left-width":639,"right-width":640},"1.1fr","0.9fr",[132,642,643],{"v-slot:left":134},[198,644],{"language":380,"src":645},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fvariable-scope-keywords-18.js",[132,647,648,651],{"v-slot:right":134},[89,649,650],{},"What to notice:",[20,652,653,656,661,666,671,679],{},[23,654,655],{},"Scope means where a variable name can be used or seen in code",[23,657,658,660],{},[50,659,604],{},": block-scoped",[23,662,663,665],{},[50,664,610],{},": block-scoped and cannot be reassigned",[23,667,668,670],{},[50,669,616],{},": function-scoped",[23,672,673,674,506,676,678],{},"Prefer ",[50,675,604],{},[50,677,610],{}," in new code",[23,680,573,681,506,683,685],{},[50,682,622],{},[50,684,625],{}," are different variables",[11,687,689,692],{"id":688,"level":14},"type-check",[16,690,691],{"id":688},"Type Check",[127,693,694,706],{"gap":129,"left-width":130,"right-width":130},[132,695,696,703],{"v-slot:left":134},[89,697,698,699,702],{},"Create ",[50,700,701],{},"public_html\u002Fm02\u002Flessons\u002Fphp-js-type-check.php",":",[198,704],{"language":138,"src":705},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Ftype-check-03.php",[132,707,708,711,714,717],{"v-slot:right":134},[89,709,710],{},"Example output:",[198,712],{"language":520,"src":713},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fexample-output-04.txt",[89,715,716],{},"Easy mistake:",[20,718,719,727,730],{},[23,720,721,506,724,726],{},[50,722,723],{},"\"2\"",[50,725,14],{}," look similar on screen",[23,728,729],{},"They are not the same type",[23,731,732],{},"Check the type before changing the comparison or math",[11,734,736,740],{"id":735,"level":14},"common-types",[16,737,739],{"id":738},"common-value-types","Common Value Types",[127,741,742,791],{"gap":129,"left-width":130,"right-width":130},[132,743,744,747,750],{"v-slot:left":134},[136,745,139],{"id":746},"php-3",[198,748],{"language":138,"src":749},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fcommon-types-12.php",[20,751,752,776,779,782],{},[23,753,754,757,758,757,761,757,764,757,767,757,770,757,773],{},[50,755,756],{},"string",", ",[50,759,760],{},"int",[50,762,763],{},"float",[50,765,766],{},"bool",[50,768,769],{},"array",[50,771,772],{},"object",[50,774,775],{},"null",[23,777,778],{},"Arrays can be ordered lists or key\u002Fvalue maps",[23,780,781],{},"Resources represent external handles, such as database connections",[23,783,784,506,787,790],{},[50,785,786],{},"PHP_INT_MAX",[50,788,789],{},"PHP_FLOAT_MAX"," show platform limits",[132,792,793,796,799],{"v-slot:right":134},[136,794,162],{"id":795},"javascript-3",[198,797],{"language":380,"src":798},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fcommon-types-13.js",[20,800,801,820,826],{},[23,802,803,757,805,757,808,757,811,757,813,757,815,757,817],{},[50,804,756],{},[50,806,807],{},"number",[50,809,810],{},"boolean",[50,812,769],{},[50,814,772],{},[50,816,775],{},[50,818,819],{},"undefined",[23,821,822,823,825],{},"JavaScript uses one ",[50,824,807],{}," type for most numeric values",[23,827,828,830,831,833],{},[50,829,775],{}," is intentional absence; ",[50,832,819],{}," usually means no value was assigned",[11,835,837,840],{"id":836,"level":14},"php-string-examples",[16,838,839],{"id":836},"PHP String Examples",[127,841,842,847],{"gap":129,"left-width":639,"right-width":640},[132,843,844],{"v-slot:left":134},[198,845],{"language":138,"src":846},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fphp-string-examples-19.php",[132,848,849,852],{"v-slot:right":134},[89,850,851],{},"Key differences:",[20,853,854,857,872,878,884],{},[23,855,856],{},"Double quotes can interpolate variables",[23,858,859,860],{},"Single quotes do not interpolate variables\n",[20,861,862],{},[23,863,864,865,506,868,871],{},"Escapes such as ",[50,866,867],{},"\\\\",[50,869,870],{},"\\'"," still have special meaning",[23,873,874,877],{},[50,875,876],{},"."," joins strings in PHP",[23,879,880,883],{},[50,881,882],{},"+"," is math, not PHP string joining",[23,885,886,887],{},"If a string is used in math, PHP may try to convert it to a number first\n",[20,888,889],{},[23,890,325,891,893],{},[50,892,439],{}," to confirm the value and type before changing the expression",[11,895,897,900],{"id":896,"level":14},"php-number-examples",[16,898,899],{"id":896},"PHP Number Examples",[127,901,902,907],{"gap":129,"left-width":130,"right-width":130},[132,903,904],{"v-slot:left":134},[198,905],{"language":138,"src":906},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fphp-number-examples-20.php",[132,908,909,911],{"v-slot:right":134},[89,910,650],{},[20,912,913,916,919,928,936,942,945],{},[23,914,915],{},"Integers are whole numbers",[23,917,918],{},"Floats use decimals",[23,920,921,924,925],{},[50,922,923],{},"++",": shorthand to increase a number by ",[50,926,927],{},"1",[23,929,930,933,934],{},[50,931,932],{},"--",": shorthand to decrease a number by ",[50,935,927],{},[23,937,938,941],{},[50,939,940],{},"+=",": shorthand to add a value and store the result",[23,943,944],{},"Float math can have precision surprises",[23,946,325,947,949],{},[50,948,439],{}," when printed output hides detail",[11,951,953,956],{"id":952,"level":14},"php-array-examples",[16,954,955],{"id":952},"PHP Array Examples",[127,957,958,963],{"gap":129,"left-width":639,"right-width":640},[132,959,960],{"v-slot:left":134},[198,961],{"language":138,"src":962},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fphp-array-examples-21.php",[132,964,965,968],{"v-slot:right":134},[89,966,967],{},"Array shapes:",[20,969,970,973,976,982,990],{},[23,971,972],{},"Indexed array: values by numeric position",[23,974,975],{},"Associative array: values by named key",[23,977,978,979],{},"Indexes start at ",[50,980,981],{},"0",[23,983,984,986,987,989],{},[50,985,439],{}," or ",[50,988,433],{}," shows structure",[23,991,992,995,996],{},[50,993,994],{},"echo $array"," cannot print the full array structure\n",[20,997,998],{},[23,999,1000,1001,1003,1004,986,1006,1008],{},"PHP only has a single value slot for ",[50,1002,423],{},", so use ",[50,1005,439],{},[50,1007,433],{}," to see keys and nested values",[11,1010,1012,1016],{"id":1011,"level":14},"javascript-typeof-examples",[16,1013,1015],{"id":1014},"javascript-type-examples","JavaScript Type Examples",[127,1017,1018,1023],{"gap":129,"left-width":639,"right-width":640},[132,1019,1020],{"v-slot:left":134},[198,1021],{"language":380,"src":1022},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fjavascript-typeof-examples-22.js",[132,1024,1025,1027],{"v-slot:right":134},[89,1026,650],{},[20,1028,1029,1035,1051,1063,1068],{},[23,1030,1031,1034],{},[50,1032,1033],{},"typeof"," helps identify primitive types",[23,1036,1037,1038,1040],{},"Arrays report as ",[50,1039,772],{},[20,1041,1042,1045],{},[23,1043,1044],{},"Arrays are a specialized kind of object in JavaScript",[23,1046,325,1047,1050],{},[50,1048,1049],{},"Array.isArray(value)"," when you need to know if the value is an array",[23,1052,1053,1055,1056,1058],{},[50,1054,775],{}," also reports as ",[50,1057,772],{},[20,1059,1060],{},[23,1061,1062],{},"This is old JavaScript behavior kept for compatibility",[23,1064,1065,1067],{},[50,1066,775],{},": a deliberately assigned empty value",[23,1069,1070,1072],{},[50,1071,819],{},": a missing or not-yet-assigned value",[11,1074,1076,1079],{"id":1075,"level":14},"string-joining",[16,1077,1078],{"id":1075},"String Joining",[127,1080,1081,1100],{"gap":129,"left-width":130,"right-width":130},[132,1082,1083,1086,1089],{"v-slot:left":134},[136,1084,139],{"id":1085},"php-4",[198,1087],{"language":138,"src":1088},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fphp-05.php",[20,1090,1091,1095],{},[23,1092,1093,877],{},[50,1094,876],{},[23,1096,1097,1099],{},[50,1098,882],{}," is for math",[132,1101,1102,1105,1108],{"v-slot:right":134},[136,1103,162],{"id":1104},"javascript-4",[198,1106],{"language":380,"src":1107},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fjavascript-06.js",[20,1109,1110,1113],{},[23,1111,1112],{},"Template literals use backticks",[23,1114,1115,1117],{},[50,1116,882],{}," can join strings in JavaScript",[11,1119,1121,1124],{"id":1120,"level":14},"operators-and-equality",[16,1122,1123],{"id":1120},"Operators And Equality",[127,1125,1126,1157],{"gap":129,"left-width":130,"right-width":130},[132,1127,1128,1131,1134],{"v-slot:left":134},[136,1129,139],{"id":1130},"php-5",[198,1132],{"language":138,"src":1133},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Foperators-and-equality-14.php",[20,1135,1136,1141,1145,1151],{},[23,1137,1138,1140],{},[50,1139,876],{}," joins strings",[23,1142,1143,1099],{},[50,1144,882],{},[23,1146,1147,1150],{},[50,1148,1149],{},"=="," checks loose equality and can convert types",[23,1152,1153,1156],{},[50,1154,1155],{},"==="," checks value and type",[132,1158,1159,1162,1165],{"v-slot:right":134},[136,1160,162],{"id":1161},"javascript-5",[198,1163],{"language":380,"src":1164},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Foperators-and-equality-15.js",[20,1166,1167,1172,1177,1181],{},[23,1168,1169,1170],{},"Template literals are usually clearer than ",[50,1171,882],{},[23,1173,1174,1176],{},[50,1175,882],{}," can do math or string joining",[23,1178,1179,1150],{},[50,1180,1149],{},[23,1182,1183,1156],{},[50,1184,1155],{},[11,1186,1188,1191],{"id":1187,"level":14},"operator-categories",[16,1189,1190],{"id":1187},"Operator Categories",[127,1192,1193,1267],{"gap":129,"left-width":130,"right-width":130},[132,1194,1195,1199],{"v-slot:left":134},[136,1196,1198],{"id":1197},"common-in-both","Common In Both",[20,1200,1201,1235,1250],{},[23,1202,1203,1204],{},"Arithmetic operators",[20,1205,1206,1211,1217,1223,1229],{},[23,1207,1208,1210],{},[50,1209,882],{},": addition",[23,1212,1213,1216],{},[50,1214,1215],{},"-",": subtraction",[23,1218,1219,1222],{},[50,1220,1221],{},"*",": multiplication",[23,1224,1225,1228],{},[50,1226,1227],{},"\u002F",": division",[23,1230,1231,1234],{},[50,1232,1233],{},"%",": remainder after division",[23,1236,1237,1238],{},"Equality operators",[20,1239,1240,1245],{},[23,1241,1242,1244],{},[50,1243,1149],{},": loose equality; may convert types",[23,1246,1247,1249],{},[50,1248,1155],{},": strict equality; checks value and type",[23,1251,1252,1253],{},"Inequality operators",[20,1254,1255,1261],{},[23,1256,1257,1260],{},[50,1258,1259],{},"!=",": loose inequality",[23,1262,1263,1266],{},[50,1264,1265],{},"!==",": strict inequality",[132,1268,1269,1298,1321,1335],{"v-slot:right":134},[23,1270,1271,1272],{},"Comparison operators\n",[20,1273,1274,1280,1286,1292],{},[23,1275,1276,1279],{},[50,1277,1278],{},">",": greater than",[23,1281,1282,1285],{},[50,1283,1284],{},"\u003C",": less than",[23,1287,1288,1291],{},[50,1289,1290],{},">=",": greater than or equal to",[23,1293,1294,1297],{},[50,1295,1296],{},"\u003C=",": less than or equal to",[23,1299,1300,1301],{},"Logical operators\n",[20,1302,1303,1309,1315],{},[23,1304,1305,1308],{},[50,1306,1307],{},"&&",": both sides must be true",[23,1310,1311,1314],{},[50,1312,1313],{},"||",": at least one side must be true",[23,1316,1317,1320],{},[50,1318,1319],{},"!",": flips true to false or false to true",[23,1322,1323,1324,1327],{},"Ternary operator: ",[50,1325,1326],{},"condition ? valueA : valueB",[20,1328,1329,1332],{},[23,1330,1331],{},"Short way to choose between two values",[23,1333,1334],{},"Avoid nested ternaries when readability suffers",[23,1336,1337,1338],{},"String joining\n",[20,1339,1340,1345],{},[23,1341,1342,1343],{},"PHP uses ",[50,1344,876],{},[23,1346,1347,1348],{},"JavaScript usually uses template literals or ",[50,1349,882],{},[11,1351,1353,1356,1359],{"id":1352,"level":14},"type-conversion-examples",[16,1354,1355],{"id":1352},"Type Conversion Examples",[89,1357,1358],{},"Type conversion means a value is treated as a different type.",[127,1360,1361,1395],{"gap":129,"left-width":130,"right-width":130},[132,1362,1363,1366,1369],{"v-slot:left":134},[136,1364,139],{"id":1365},"php-6",[198,1367],{"language":138,"src":1368},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Ftype-conversion-examples-25.php",[20,1370,1371,1377,1383,1389],{},[23,1372,1373,1376],{},[50,1374,1375],{},"(int)"," turns numeric text into an integer",[23,1378,1379,1382],{},[50,1380,1381],{},"(float)"," turns decimal text into a float",[23,1384,1385,1388],{},[50,1386,1387],{},"(string)"," turns a value into text",[23,1390,1391,1394],{},[50,1392,1393],{},"explode()"," can split text into an array",[132,1396,1397,1400,1403],{"v-slot:right":134},[136,1398,162],{"id":1399},"javascript-6",[198,1401],{"language":380,"src":1402},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Ftype-conversion-examples-26.js",[20,1404,1405,1411,1417,1423],{},[23,1406,1407,1410],{},[50,1408,1409],{},"Number()"," turns numeric text into a number",[23,1412,1413,1416],{},[50,1414,1415],{},"parseFloat()"," reads decimal text as a number",[23,1418,1419,1422],{},[50,1420,1421],{},"Boolean()"," turns truthy\u002Ffalsy values into a boolean",[23,1424,1425,1394],{},[50,1426,1427],{},"split()",[11,1429,1431,1434],{"id":1430,"level":14},"php-error-reading",[16,1432,1433],{"id":1430},"PHP Error Reading",[20,1435,1436,1439,1442,1445,1448,1451],{},[23,1437,1438],{},"Start from a page that already worked",[23,1440,1441],{},"Break one line on purpose only while practicing",[23,1443,1444],{},"Read the newest error entry before changing code",[23,1446,1447],{},"Extract the error type, file path, and line number",[23,1449,1450],{},"Check the reported line and the line above it",[23,1452,1453],{},"See the slides below for common error examples and the fix loop",[11,1455,1457,1461],{"id":1456,"level":632},"syntax-error-example",[16,1458,1460],{"id":1459},"example-syntax-error","Example: Syntax Error",[127,1462,1463,1477],{"gap":129,"left-width":130,"right-width":130},[132,1464,1465,1468,1471,1474],{"v-slot:left":134},[89,1466,1467],{},"Working line:",[198,1469],{"language":138,"src":1470},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fbreak-one-line-on-purpos-02.php",[89,1472,1473],{},"Broken line:",[198,1475],{"language":138,"src":1476},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fbreak-one-line-on-purpos-03.php",[132,1478,1479,1482],{"v-slot:right":134},[89,1480,1481],{},"What changed:",[20,1483,1484,1487,1490,1493,1496],{},[23,1485,1486],{},"Removed the semicolon",[23,1488,1489],{},"PHP statement is no longer complete",[23,1491,1492],{},"The browser may show a server error or blank output",[23,1494,1495],{},"Keep the change small so the clue points to one likely cause",[23,1497,1498],{},"Next slide shows how to check the error",[11,1500,1502,1505],{"id":1501,"level":632},"server-error-log",[16,1503,1504],{"id":1501},"Server Error Log",[127,1506,1507,1519],{"gap":129,"left-width":130,"right-width":130},[132,1508,1509,1512,1516],{"v-slot:left":134},[89,1510,1511],{},"If the local server uses Apache, run inside Ubuntu:",[198,1513],{"language":1514,"src":1515},"bash","\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fread-the-apache-error-lo-04.sh",[89,1517,1518],{},"Read the newest entry after each refresh.",[132,1520,1521,1524,1527],{"v-slot:right":134},[89,1522,1523],{},"Look for:",[198,1525],{"language":520,"src":1526},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fexample-output-05.txt",[20,1528,1529,1532,1535,1538],{},[23,1530,1531],{},"Error type",[23,1533,1534],{},"File path",[23,1536,1537],{},"Line number",[23,1539,1540],{},"Nearby token or variable name",[11,1542,1544,1548],{"id":1543,"level":632},"undefined-variable",[16,1545,1547],{"id":1546},"example-undefined-variable","Example: Undefined Variable",[127,1549,1550,1558],{"gap":129,"left-width":130,"right-width":130},[132,1551,1552,1555],{"v-slot:left":134},[89,1553,1554],{},"Broken code:",[198,1556],{"language":138,"src":1557},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fundefined-variable-15.php",[132,1559,1560,1563,1566],{"v-slot:right":134},[89,1561,1562],{},"Likely message:",[198,1564],{"language":520,"src":1565},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fundefined-variable-output-16.txt",[20,1567,1568,1577,1580],{},[23,1569,1570,506,1573,1576],{},[50,1571,1572],{},"$courseCode",[50,1574,1575],{},"$coursecode"," are different names",[23,1578,1579],{},"The page may keep running, but the output is wrong",[23,1581,1582],{},"Fix the variable name that does not match",[11,1584,1586,1590],{"id":1585,"level":632},"undefined-function",[16,1587,1589],{"id":1588},"example-undefined-function","Example: Undefined Function",[127,1591,1592,1599],{"gap":129,"left-width":130,"right-width":130},[132,1593,1594,1596],{"v-slot:left":134},[89,1595,1554],{},[198,1597],{"language":138,"src":1598},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fundefined-function-17.php",[132,1600,1601,1603,1606],{"v-slot:right":134},[89,1602,1562],{},[198,1604],{"language":520,"src":1605},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fundefined-function-output-18.txt",[20,1607,1608,1611,1614],{},[23,1609,1610],{},"PHP found a function call it does not know",[23,1612,1613],{},"Check spelling first",[23,1615,1616],{},"Then check whether the file that defines the function was included",[11,1618,1620,1623,1643],{"id":1619,"level":632},"debugging-loop",[16,1621,1622],{"id":1619},"Debugging Loop",[93,1624,1625,1628,1631,1634,1637,1640],{},[23,1626,1627],{},"Reproduce the issue",[23,1629,1630],{},"Read the newest error message",[23,1632,1633],{},"Identify file and line",[23,1635,1636],{},"Check that line and the line above it",[23,1638,1639],{},"Change one thing",[23,1641,1642],{},"Retest the same URL",[1644,1645,1647],"admonition",{"type":1646},"warning",[89,1648,1649],{},"Change one thing, then retest. Several edits at once make it harder to know which line caused the new result.",[11,1651,1653,1656,1659,1662,1665],{"id":1652,"level":14},"predict-the-output",[16,1654,1655],{"id":1652},"Predict The Output",[89,1657,1658],{},"Before running this, decide what each line prints:",[198,1660],{"language":138,"src":1661},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript\u002Fpredict-the-output-09.php",[89,1663,1664],{},"Then run it and compare.",[89,1666,1667],{},"The goal is to check assumptions with evidence rather than trying to memorize every conversion.",[11,1669,1671,1674],{"id":1670,"level":14},"knowledge-check",[16,1672,1673],{"id":1670},"Knowledge Check",[20,1675,1676,1682,1685,1688,1696,1699,1702,1709,1715,1720],{},[23,1677,1678,1679,1681],{},"Which language runs first when a ",[50,1680,208],{}," page is requested?",[23,1683,1684],{},"Which tool shows PHP type and value?",[23,1686,1687],{},"Which tool shows JavaScript console output?",[23,1689,1690,1691,506,1693,1695],{},"What is the difference between ",[50,1692,723],{},[50,1694,14],{},"?",[23,1697,1698],{},"What does raw PHP in the browser usually mean?",[23,1700,1701],{},"What is the PHP operator for joining strings?",[23,1703,1704,1705,986,1707,1695],{},"What does JavaScript have that PHP does not: ",[50,1706,775],{},[50,1708,819],{},[23,1710,1711,1712,1714],{},"Why can ",[50,1713,1033],{}," on a JavaScript array surprise beginners?",[23,1716,1717,1718,1695],{},"Why do PHP variables start with ",[50,1719,291],{},[23,1721,1722],{},"Why should error reading start with the newest log entry?",[11,1724,1726,1730],{"id":1725,"level":14},"finish-lesson-branch",[16,1727,1729],{"id":1728},"finish-the-lesson-branch","Finish The Lesson Branch",[93,1731,1732,1737,1743,1749,1755,1765,1776],{},[23,1733,1734,1735],{},"Check the final file list: ",[50,1736,80],{},[23,1738,1739,1740],{},"Stage the lesson work: ",[50,1741,1742],{},"git add public_html\u002Fm02\u002Flessons\u002F",[23,1744,1745,1746],{},"Commit the practice work: ",[50,1747,1748],{},"git commit -m \"Complete lesson practice\"",[23,1750,1751,1752],{},"Push the branch: ",[50,1753,1754],{},"git push origin Module02-PHP-vs-JS",[23,1756,1757,1758,1760,1761,1764],{},"On GitHub, open a pull request from ",[50,1759,58],{}," into ",[50,1762,1763],{},"qa",", review it, then merge",[23,1766,1767,1768,1770,1771,1760,1773],{},"Briefly test ",[50,1769,1763],{},", then open and merge a pull request from ",[50,1772,1763],{},[50,1774,1775],{},"prod",[23,1777,1778,1779,1782,1783],{},"Prepare for the next lesson: ",[50,1780,1781],{},"git checkout qa"," then ",[50,1784,1785],{},"git pull origin qa",[11,1787,1789,1792],{"id":1788,"level":14},"summary",[16,1790,1791],{"id":1788},"Summary",[20,1793,1794,1797,1800,1803,1806,1809],{},[23,1795,1796],{},"PHP runs on the server before the browser receives the response",[23,1798,1799],{},"JavaScript usually runs in the browser after the page loads",[23,1801,1802],{},"Output and inspection tools show different details depending on where the code runs",[23,1804,1805],{},"Type checks help explain why similar-looking values can behave differently",[23,1807,1808],{},"Error reading starts with the newest message, file path, and line number",[23,1810,1811,1812,506,1814],{},"Lesson work should end with a reviewed branch merge through ",[50,1813,1763],{},[50,1815,1775],{},[11,1817,1819,1823],{"id":1818,"level":14},"key-terms",[16,1820,1822],{"id":1821},"key-terms-and-further-learning","Key Terms And Further Learning",[127,1824,1825,1867],{"gap":129,"left-width":130,"right-width":130},[132,1826,1827,1830,1837,1843,1849,1855,1861],{"v-slot:left":134},[136,1828,1829],{"id":1818},"Key Terms",[89,1831,1832,1836],{},[1833,1834,1835],"strong",{},"Runtime"," - The place where code executes",[89,1838,1839,1842],{},[1833,1840,1841],{},"Type"," - The kind of value, such as string, integer, boolean, array, or null",[89,1844,1845,1848],{},[1833,1846,1847],{},"Console"," - Browser developer tool panel for JavaScript output",[89,1850,1851,1854],{},[1833,1852,1853],{},"Strict comparison"," - Comparison that checks value and type",[89,1856,1857,1860],{},[1833,1858,1859],{},"Undefined"," - JavaScript value used when a variable or property has no assigned value",[89,1862,1863,1866],{},[1833,1864,1865],{},"Parse error"," - PHP could not understand the code structure",[132,1868,1869,1873],{"v-slot:right":134},[136,1870,1872],{"id":1871},"further-learning","Further Learning",[20,1874,1875,1884,1891,1898,1905,1912,1919],{},[23,1876,1877],{},[1878,1879,1883],"a",{"href":1880,"rel":1881},"https:\u002F\u002Fwww.php.net\u002Fmanual\u002Fen\u002Flanguage.basic-syntax.php",[1882],"nofollow","PHP Manual: Basic syntax",[23,1885,1886],{},[1878,1887,1890],{"href":1888,"rel":1889},"https:\u002F\u002Fwww.php.net\u002Fmanual\u002Fen\u002Flanguage.types.type-juggling.php",[1882],"PHP Manual: Type juggling",[23,1892,1893],{},[1878,1894,1897],{"href":1895,"rel":1896},"https:\u002F\u002Fwww.php.net\u002Fmanual\u002Fen\u002Flanguage.operators.php",[1882],"PHP Manual: Operators",[23,1899,1900],{},[1878,1901,1904],{"href":1902,"rel":1903},"https:\u002F\u002Fwww.php.net\u002Fmanual\u002Fen\u002Flanguage.errors.php",[1882],"PHP Manual: Errors",[23,1906,1907],{},[1878,1908,1911],{"href":1909,"rel":1910},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FJavaScript\u002FData_structures",[1882],"MDN: JavaScript data types",[23,1913,1914],{},[1878,1915,1918],{"href":1916,"rel":1917},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FJavaScript\u002FReference\u002FOperators\u002Ftypeof",[1882],"MDN: typeof",[23,1920,1921],{},[1878,1922,1925],{"href":1923,"rel":1924},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FJavaScript\u002FEquality_comparisons_and_sameness",[1882],"MDN: Equality comparisons",{"title":134,"searchDepth":1927,"depth":1927,"links":1928},2,[1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961],{"id":13,"depth":1927,"text":18},{"id":40,"depth":1927,"text":43},{"id":84,"depth":1927,"text":87},{"id":124,"depth":1927,"text":125},{"id":185,"depth":1927,"text":188},{"id":256,"depth":1927,"text":259},{"id":266,"depth":1927,"text":269},{"id":334,"depth":1927,"text":100},{"id":404,"depth":1927,"text":405},{"id":490,"depth":1927,"text":491},{"id":542,"depth":1927,"text":545},{"id":635,"depth":1927,"text":636},{"id":688,"depth":1927,"text":691},{"id":738,"depth":1927,"text":739},{"id":836,"depth":1927,"text":839},{"id":896,"depth":1927,"text":899},{"id":952,"depth":1927,"text":955},{"id":1014,"depth":1927,"text":1015},{"id":1075,"depth":1927,"text":1078},{"id":1120,"depth":1927,"text":1123},{"id":1187,"depth":1927,"text":1190},{"id":1352,"depth":1927,"text":1355},{"id":1430,"depth":1927,"text":1433},{"id":1459,"depth":1927,"text":1460},{"id":1501,"depth":1927,"text":1504},{"id":1546,"depth":1927,"text":1547},{"id":1588,"depth":1927,"text":1589},{"id":1619,"depth":1927,"text":1622},{"id":1652,"depth":1927,"text":1655},{"id":1670,"depth":1927,"text":1673},{"id":1728,"depth":1927,"text":1729},{"id":1788,"depth":1927,"text":1791},{"id":1821,"depth":1927,"text":1822},"presentation","Internet Applications","Compare where PHP and JavaScript run, how each language stores and prints values, and how to read beginner PHP errors.","Face-to-face class of about 40 students; includes comparison prompts, short coding checks, browser output checks, and controlled debugging examples.","15","70","85","md",{},true,"10","\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript",false,{"title":5,"description":1964},"published","internet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F01-compare-php-and-javascript",[138,161,1979,1980],"syntax","debugging","1:16:00","-tJOAgjl6XU","https:\u002F\u002Fyoutu.be\u002F-tJOAgjl6XU","Comparing PHP and JavaScript","sFnFWEQxWJ5G4aR3awi7HQRy4HpMeqT5B4JOTjWhUvI",null,[],[1989,3399],{"id":4,"title":5,"audience":6,"body":1990,"contentType":1962,"course":1963,"description":1964,"estimateBasis":1965,"estimatedDiscussionMinutes":1966,"estimatedLiveMinutes":1967,"estimatedTotalMinutes":1968,"extension":1969,"meta":3396,"module":14,"navigation":1971,"order":1972,"path":1973,"promptAssist":1974,"seo":3397,"status":1976,"stem":1977,"tags":3398,"videoDuration":1981,"videoId":1982,"videoLink":1983,"videoTitle":1984,"week":14,"__hash__":1985},{"type":8,"value":1991,"toc":3361},[1992,2008,2036,2060,2100,2146,2152,2202,2254,2312,2352,2416,2458,2492,2566,2610,2652,2696,2746,2782,2836,2956,3012,3030,3062,3092,3122,3148,3170,3182,3222,3264,3286],[11,1993,1994,1996],{"id":13,"level":14},[16,1995,18],{"id":13},[20,1997,1998,2000,2002,2004,2006],{},[23,1999,25],{},[23,2001,28],{},[23,2003,31],{},[23,2005,34],{},[23,2007,37],{},[11,2009,2010,2012],{"id":40,"level":14},[16,2011,43],{"id":40},[20,2013,2014,2018,2022,2024,2030,2032],{},[23,2015,48,2016],{},[50,2017,52],{},[23,2019,55,2020],{},[50,2021,58],{},[23,2023,61],{},[23,2025,64,2026,68,2028],{},[50,2027,67],{},[50,2029,71],{},[23,2031,74],{},[23,2033,77,2034,81],{},[50,2035,80],{},[11,2037,2038,2040,2042,2058],{"id":84,"level":14},[16,2039,87],{"id":84},[89,2041,91],{},[93,2043,2044,2046,2048,2050,2052,2054,2056],{},[23,2045,97],{},[23,2047,100],{},[23,2049,103],{},[23,2051,106],{},[23,2053,109],{},[23,2055,112],{},[23,2057,115],{},[89,2059,118],{},[11,2061,2062,2064,2098],{"id":121,"level":14},[16,2063,125],{"id":124},[127,2065,2066,2082],{"gap":129,"left-width":130,"right-width":130},[132,2067,2068,2070],{"v-slot:left":134},[136,2069,139],{"id":138},[20,2071,2072,2074,2076,2078,2080],{},[23,2073,144],{},[23,2075,147],{},[23,2077,150],{},[23,2079,153],{},[23,2081,156],{},[132,2083,2084,2086],{"v-slot:right":134},[136,2085,162],{"id":161},[20,2087,2088,2090,2092,2094,2096],{},[23,2089,167],{},[23,2091,170],{},[23,2093,173],{},[23,2095,176],{},[23,2097,179],{},[89,2099,182],{},[11,2101,2102,2104],{"id":185,"level":14},[16,2103,188],{"id":185},[127,2105,2106,2128],{"gap":129,"left-width":130,"right-width":130},[132,2107,2108,2110,2112],{"v-slot:left":134},[136,2109,196],{"id":195},[198,2111],{"language":138,"src":200},[20,2113,2114,2118,2122,2126],{},[23,2115,205,2116],{},[50,2117,208],{},[23,2119,2120,214],{},[50,2121,213],{},[23,2123,217,2124,221],{},[50,2125,220],{},[23,2127,224],{},[132,2129,2130,2132,2134],{"v-slot:right":134},[136,2131,230],{"id":229},[198,2133],{"language":233,"src":234},[20,2135,2136,2142,2144],{},[23,2137,239,2138,243,2140,247],{},[50,2139,242],{},[50,2141,246],{},[23,2143,250],{},[23,2145,253],{},[11,2147,2148,2150],{"id":256,"level":14},[16,2149,259],{"id":256},[261,2151],{"code":263},[11,2153,2154,2156,2158,2160],{"id":266,"level":14},[16,2155,269],{"id":266},[198,2157],{"language":138,"src":272},[89,2159,275],{},[127,2161,2162,2184],{"gap":129,"left-width":130,"right-width":130},[132,2163,2164],{"v-slot:left":134},[20,2165,2166,2170,2178,2182],{},[23,2167,2168,286],{},[50,2169,213],{},[23,2171,2172,292,2174],{},[50,2173,291],{},[20,2175,2176],{},[23,2177,297],{},[23,2179,2180,303],{},[50,2181,302],{},[23,2183,306],{},[132,2185,2186,2190,2200],{"v-slot:right":134},[23,2187,311,2188,314],{},[50,2189,208],{},[23,2191,317,2192,320,2194],{},[50,2193,220],{},[20,2195,2196],{},[23,2197,325,2198,328],{},[50,2199,220],{},[23,2201,331],{},[11,2203,2204,2206,2252],{"id":334,"level":14},[16,2205,100],{"id":334},[127,2207,2208,2232],{"gap":129,"left-width":130,"right-width":130},[132,2209,2210,2212,2214],{"v-slot:left":134},[136,2211,139],{"id":343},[198,2213],{"language":138,"src":346},[20,2215,2216,2220,2224,2228],{},[23,2217,2218,354],{},[50,2219,353],{},[23,2221,2222,360],{},[50,2223,359],{},[23,2225,2226,366],{},[50,2227,365],{},[23,2229,2230,372],{},[50,2231,371],{},[132,2233,2234,2236,2238],{"v-slot:right":134},[136,2235,162],{"id":377},[198,2237],{"language":380,"src":381},[20,2239,2240,2244,2248],{},[23,2241,2242,354],{},[50,2243,353],{},[23,2245,2246,366],{},[50,2247,365],{},[23,2249,2250,372],{},[50,2251,371],{},[89,2253,398],{},[11,2255,2256,2258],{"id":401,"level":14},[16,2257,405],{"id":404},[127,2259,2260,2286],{"gap":129,"left-width":130,"right-width":130},[132,2261,2262,2264,2266],{"v-slot:left":134},[136,2263,413],{"id":412},[198,2265],{"language":138,"src":416},[20,2267,2268,2274,2278,2282],{},[23,2269,2270,424,2272,428],{},[50,2271,423],{},[50,2273,427],{},[23,2275,2276,434],{},[50,2277,433],{},[23,2279,2280,440],{},[50,2281,439],{},[23,2283,325,2284,446],{},[50,2285,445],{},[132,2287,2288,2290,2292],{"v-slot:right":134},[136,2289,452],{"id":451},[198,2291],{"language":380,"src":455},[20,2293,2294,2298,2302,2304,2308],{},[23,2295,2296,463],{},[50,2297,462],{},[23,2299,2300,469],{},[50,2301,468],{},[23,2303,472],{},[23,2305,475,2306],{},[50,2307,478],{},[23,2309,481,2310],{},[50,2311,484],{},[11,2313,2314,2316],{"id":487,"level":14},[16,2315,491],{"id":490},[127,2317,2318,2332],{"gap":129,"left-width":130,"right-width":130},[132,2319,2320,2322,2324],{"v-slot:left":134},[89,2321,498],{},[198,2323],{"language":138,"src":501},[89,2325,2326,506,2328,509,2330,512],{},[50,2327,433],{},[50,2329,439],{},[50,2331,423],{},[132,2333,2334,2336,2338],{"v-slot:right":134},[89,2335,517],{},[198,2337],{"language":520,"src":521},[20,2339,2340,2344,2348],{},[23,2341,2342,528],{},[50,2343,423],{},[23,2345,531,2346,534],{},[50,2347,423],{},[23,2349,2350,539],{},[50,2351,439],{},[11,2353,2354,2356],{"id":542,"level":14},[16,2355,545],{"id":542},[127,2357,2358,2386],{"gap":129,"left-width":130,"right-width":130},[132,2359,2360,2362,2364],{"v-slot:left":134},[136,2361,139],{"id":552},[198,2363],{"language":138,"src":555},[20,2365,2366,2370,2372,2376,2382],{},[23,2367,560,2368],{},[50,2369,291],{},[23,2371,565],{},[23,2373,568,2374],{},[50,2375,291],{},[23,2377,573,2378,506,2380,580],{},[50,2379,576],{},[50,2381,579],{},[23,2383,2384,586],{},[50,2385,585],{},[132,2387,2388,2390,2392],{"v-slot:right":134},[136,2389,162],{"id":591},[198,2391],{"language":380,"src":594},[20,2393,2394,2396,2400,2404,2408,2414],{},[23,2395,599],{},[23,2397,2398,605],{},[50,2399,604],{},[23,2401,2402,611],{},[50,2403,610],{},[23,2405,2406,617],{},[50,2407,616],{},[23,2409,573,2410,506,2412,580],{},[50,2411,622],{},[50,2413,625],{},[23,2415,628],{},[11,2417,2418,2420],{"id":631,"level":632},[16,2419,636],{"id":635},[127,2421,2422,2426],{"gap":129,"left-width":639,"right-width":640},[132,2423,2424],{"v-slot:left":134},[198,2425],{"language":380,"src":645},[132,2427,2428,2430],{"v-slot:right":134},[89,2429,650],{},[20,2431,2432,2434,2438,2442,2446,2452],{},[23,2433,655],{},[23,2435,2436,660],{},[50,2437,604],{},[23,2439,2440,665],{},[50,2441,610],{},[23,2443,2444,670],{},[50,2445,616],{},[23,2447,673,2448,506,2450,678],{},[50,2449,604],{},[50,2451,610],{},[23,2453,573,2454,506,2456,685],{},[50,2455,622],{},[50,2457,625],{},[11,2459,2460,2462],{"id":688,"level":14},[16,2461,691],{"id":688},[127,2463,2464,2472],{"gap":129,"left-width":130,"right-width":130},[132,2465,2466,2470],{"v-slot:left":134},[89,2467,698,2468,702],{},[50,2469,701],{},[198,2471],{"language":138,"src":705},[132,2473,2474,2476,2478,2480],{"v-slot:right":134},[89,2475,710],{},[198,2477],{"language":520,"src":713},[89,2479,716],{},[20,2481,2482,2488,2490],{},[23,2483,2484,506,2486,726],{},[50,2485,723],{},[50,2487,14],{},[23,2489,729],{},[23,2491,732],{},[11,2493,2494,2496],{"id":735,"level":14},[16,2495,739],{"id":738},[127,2497,2498,2532],{"gap":129,"left-width":130,"right-width":130},[132,2499,2500,2502,2504],{"v-slot:left":134},[136,2501,139],{"id":746},[198,2503],{"language":138,"src":749},[20,2505,2506,2522,2524,2526],{},[23,2507,2508,757,2510,757,2512,757,2514,757,2516,757,2518,757,2520],{},[50,2509,756],{},[50,2511,760],{},[50,2513,763],{},[50,2515,766],{},[50,2517,769],{},[50,2519,772],{},[50,2521,775],{},[23,2523,778],{},[23,2525,781],{},[23,2527,2528,506,2530,790],{},[50,2529,786],{},[50,2531,789],{},[132,2533,2534,2536,2538],{"v-slot:right":134},[136,2535,162],{"id":795},[198,2537],{"language":380,"src":798},[20,2539,2540,2556,2560],{},[23,2541,2542,757,2544,757,2546,757,2548,757,2550,757,2552,757,2554],{},[50,2543,756],{},[50,2545,807],{},[50,2547,810],{},[50,2549,769],{},[50,2551,772],{},[50,2553,775],{},[50,2555,819],{},[23,2557,822,2558,825],{},[50,2559,807],{},[23,2561,2562,830,2564,833],{},[50,2563,775],{},[50,2565,819],{},[11,2567,2568,2570],{"id":836,"level":14},[16,2569,839],{"id":836},[127,2571,2572,2576],{"gap":129,"left-width":639,"right-width":640},[132,2573,2574],{"v-slot:left":134},[198,2575],{"language":138,"src":846},[132,2577,2578,2580],{"v-slot:right":134},[89,2579,851],{},[20,2581,2582,2584,2594,2598,2602],{},[23,2583,856],{},[23,2585,859,2586],{},[20,2587,2588],{},[23,2589,864,2590,506,2592,871],{},[50,2591,867],{},[50,2593,870],{},[23,2595,2596,877],{},[50,2597,876],{},[23,2599,2600,883],{},[50,2601,882],{},[23,2603,886,2604],{},[20,2605,2606],{},[23,2607,325,2608,893],{},[50,2609,439],{},[11,2611,2612,2614],{"id":896,"level":14},[16,2613,899],{"id":896},[127,2615,2616,2620],{"gap":129,"left-width":130,"right-width":130},[132,2617,2618],{"v-slot:left":134},[198,2619],{"language":138,"src":906},[132,2621,2622,2624],{"v-slot:right":134},[89,2623,650],{},[20,2625,2626,2628,2630,2636,2642,2646,2648],{},[23,2627,915],{},[23,2629,918],{},[23,2631,2632,924,2634],{},[50,2633,923],{},[50,2635,927],{},[23,2637,2638,933,2640],{},[50,2639,932],{},[50,2641,927],{},[23,2643,2644,941],{},[50,2645,940],{},[23,2647,944],{},[23,2649,325,2650,949],{},[50,2651,439],{},[11,2653,2654,2656],{"id":952,"level":14},[16,2655,955],{"id":952},[127,2657,2658,2662],{"gap":129,"left-width":639,"right-width":640},[132,2659,2660],{"v-slot:left":134},[198,2661],{"language":138,"src":962},[132,2663,2664,2666],{"v-slot:right":134},[89,2665,967],{},[20,2667,2668,2670,2672,2676,2682],{},[23,2669,972],{},[23,2671,975],{},[23,2673,978,2674],{},[50,2675,981],{},[23,2677,2678,986,2680,989],{},[50,2679,439],{},[50,2681,433],{},[23,2683,2684,995,2686],{},[50,2685,994],{},[20,2687,2688],{},[23,2689,1000,2690,1003,2692,986,2694,1008],{},[50,2691,423],{},[50,2693,439],{},[50,2695,433],{},[11,2697,2698,2700],{"id":1011,"level":14},[16,2699,1015],{"id":1014},[127,2701,2702,2706],{"gap":129,"left-width":639,"right-width":640},[132,2703,2704],{"v-slot:left":134},[198,2705],{"language":380,"src":1022},[132,2707,2708,2710],{"v-slot:right":134},[89,2709,650],{},[20,2711,2712,2716,2728,2738,2742],{},[23,2713,2714,1034],{},[50,2715,1033],{},[23,2717,1037,2718,2720],{},[50,2719,772],{},[20,2721,2722,2724],{},[23,2723,1044],{},[23,2725,325,2726,1050],{},[50,2727,1049],{},[23,2729,2730,1055,2732,2734],{},[50,2731,775],{},[50,2733,772],{},[20,2735,2736],{},[23,2737,1062],{},[23,2739,2740,1067],{},[50,2741,775],{},[23,2743,2744,1072],{},[50,2745,819],{},[11,2747,2748,2750],{"id":1075,"level":14},[16,2749,1078],{"id":1075},[127,2751,2752,2768],{"gap":129,"left-width":130,"right-width":130},[132,2753,2754,2756,2758],{"v-slot:left":134},[136,2755,139],{"id":1085},[198,2757],{"language":138,"src":1088},[20,2759,2760,2764],{},[23,2761,2762,877],{},[50,2763,876],{},[23,2765,2766,1099],{},[50,2767,882],{},[132,2769,2770,2772,2774],{"v-slot:right":134},[136,2771,162],{"id":1104},[198,2773],{"language":380,"src":1107},[20,2775,2776,2778],{},[23,2777,1112],{},[23,2779,2780,1117],{},[50,2781,882],{},[11,2783,2784,2786],{"id":1120,"level":14},[16,2785,1123],{"id":1120},[127,2787,2788,2812],{"gap":129,"left-width":130,"right-width":130},[132,2789,2790,2792,2794],{"v-slot:left":134},[136,2791,139],{"id":1130},[198,2793],{"language":138,"src":1133},[20,2795,2796,2800,2804,2808],{},[23,2797,2798,1140],{},[50,2799,876],{},[23,2801,2802,1099],{},[50,2803,882],{},[23,2805,2806,1150],{},[50,2807,1149],{},[23,2809,2810,1156],{},[50,2811,1155],{},[132,2813,2814,2816,2818],{"v-slot:right":134},[136,2815,162],{"id":1161},[198,2817],{"language":380,"src":1164},[20,2819,2820,2824,2828,2832],{},[23,2821,1169,2822],{},[50,2823,882],{},[23,2825,2826,1176],{},[50,2827,882],{},[23,2829,2830,1150],{},[50,2831,1149],{},[23,2833,2834,1156],{},[50,2835,1155],{},[11,2837,2838,2840],{"id":1187,"level":14},[16,2839,1190],{"id":1187},[127,2841,2842,2896],{"gap":129,"left-width":130,"right-width":130},[132,2843,2844,2846],{"v-slot:left":134},[136,2845,1198],{"id":1197},[20,2847,2848,2872,2884],{},[23,2849,1203,2850],{},[20,2851,2852,2856,2860,2864,2868],{},[23,2853,2854,1210],{},[50,2855,882],{},[23,2857,2858,1216],{},[50,2859,1215],{},[23,2861,2862,1222],{},[50,2863,1221],{},[23,2865,2866,1228],{},[50,2867,1227],{},[23,2869,2870,1234],{},[50,2871,1233],{},[23,2873,1237,2874],{},[20,2875,2876,2880],{},[23,2877,2878,1244],{},[50,2879,1149],{},[23,2881,2882,1249],{},[50,2883,1155],{},[23,2885,1252,2886],{},[20,2887,2888,2892],{},[23,2889,2890,1260],{},[50,2891,1259],{},[23,2893,2894,1266],{},[50,2895,1265],{},[132,2897,2898,2918,2934,2944],{"v-slot:right":134},[23,2899,1271,2900],{},[20,2901,2902,2906,2910,2914],{},[23,2903,2904,1279],{},[50,2905,1278],{},[23,2907,2908,1285],{},[50,2909,1284],{},[23,2911,2912,1291],{},[50,2913,1290],{},[23,2915,2916,1297],{},[50,2917,1296],{},[23,2919,1300,2920],{},[20,2921,2922,2926,2930],{},[23,2923,2924,1308],{},[50,2925,1307],{},[23,2927,2928,1314],{},[50,2929,1313],{},[23,2931,2932,1320],{},[50,2933,1319],{},[23,2935,1323,2936,2938],{},[50,2937,1326],{},[20,2939,2940,2942],{},[23,2941,1331],{},[23,2943,1334],{},[23,2945,1337,2946],{},[20,2947,2948,2952],{},[23,2949,1342,2950],{},[50,2951,876],{},[23,2953,1347,2954],{},[50,2955,882],{},[11,2957,2958,2960,2962],{"id":1352,"level":14},[16,2959,1355],{"id":1352},[89,2961,1358],{},[127,2963,2964,2988],{"gap":129,"left-width":130,"right-width":130},[132,2965,2966,2968,2970],{"v-slot:left":134},[136,2967,139],{"id":1365},[198,2969],{"language":138,"src":1368},[20,2971,2972,2976,2980,2984],{},[23,2973,2974,1376],{},[50,2975,1375],{},[23,2977,2978,1382],{},[50,2979,1381],{},[23,2981,2982,1388],{},[50,2983,1387],{},[23,2985,2986,1394],{},[50,2987,1393],{},[132,2989,2990,2992,2994],{"v-slot:right":134},[136,2991,162],{"id":1399},[198,2993],{"language":380,"src":1402},[20,2995,2996,3000,3004,3008],{},[23,2997,2998,1410],{},[50,2999,1409],{},[23,3001,3002,1416],{},[50,3003,1415],{},[23,3005,3006,1422],{},[50,3007,1421],{},[23,3009,3010,1394],{},[50,3011,1427],{},[11,3013,3014,3016],{"id":1430,"level":14},[16,3015,1433],{"id":1430},[20,3017,3018,3020,3022,3024,3026,3028],{},[23,3019,1438],{},[23,3021,1441],{},[23,3023,1444],{},[23,3025,1447],{},[23,3027,1450],{},[23,3029,1453],{},[11,3031,3032,3034],{"id":1456,"level":632},[16,3033,1460],{"id":1459},[127,3035,3036,3046],{"gap":129,"left-width":130,"right-width":130},[132,3037,3038,3040,3042,3044],{"v-slot:left":134},[89,3039,1467],{},[198,3041],{"language":138,"src":1470},[89,3043,1473],{},[198,3045],{"language":138,"src":1476},[132,3047,3048,3050],{"v-slot:right":134},[89,3049,1481],{},[20,3051,3052,3054,3056,3058,3060],{},[23,3053,1486],{},[23,3055,1489],{},[23,3057,1492],{},[23,3059,1495],{},[23,3061,1498],{},[11,3063,3064,3066],{"id":1501,"level":632},[16,3065,1504],{"id":1501},[127,3067,3068,3076],{"gap":129,"left-width":130,"right-width":130},[132,3069,3070,3072,3074],{"v-slot:left":134},[89,3071,1511],{},[198,3073],{"language":1514,"src":1515},[89,3075,1518],{},[132,3077,3078,3080,3082],{"v-slot:right":134},[89,3079,1523],{},[198,3081],{"language":520,"src":1526},[20,3083,3084,3086,3088,3090],{},[23,3085,1531],{},[23,3087,1534],{},[23,3089,1537],{},[23,3091,1540],{},[11,3093,3094,3096],{"id":1543,"level":632},[16,3095,1547],{"id":1546},[127,3097,3098,3104],{"gap":129,"left-width":130,"right-width":130},[132,3099,3100,3102],{"v-slot:left":134},[89,3101,1554],{},[198,3103],{"language":138,"src":1557},[132,3105,3106,3108,3110],{"v-slot:right":134},[89,3107,1562],{},[198,3109],{"language":520,"src":1565},[20,3111,3112,3118,3120],{},[23,3113,3114,506,3116,1576],{},[50,3115,1572],{},[50,3117,1575],{},[23,3119,1579],{},[23,3121,1582],{},[11,3123,3124,3126],{"id":1585,"level":632},[16,3125,1589],{"id":1588},[127,3127,3128,3134],{"gap":129,"left-width":130,"right-width":130},[132,3129,3130,3132],{"v-slot:left":134},[89,3131,1554],{},[198,3133],{"language":138,"src":1598},[132,3135,3136,3138,3140],{"v-slot:right":134},[89,3137,1562],{},[198,3139],{"language":520,"src":1605},[20,3141,3142,3144,3146],{},[23,3143,1610],{},[23,3145,1613],{},[23,3147,1616],{},[11,3149,3150,3152,3166],{"id":1619,"level":632},[16,3151,1622],{"id":1619},[93,3153,3154,3156,3158,3160,3162,3164],{},[23,3155,1627],{},[23,3157,1630],{},[23,3159,1633],{},[23,3161,1636],{},[23,3163,1639],{},[23,3165,1642],{},[1644,3167,3168],{"type":1646},[89,3169,1649],{},[11,3171,3172,3174,3176,3178,3180],{"id":1652,"level":14},[16,3173,1655],{"id":1652},[89,3175,1658],{},[198,3177],{"language":138,"src":1661},[89,3179,1664],{},[89,3181,1667],{},[11,3183,3184,3186],{"id":1670,"level":14},[16,3185,1673],{"id":1670},[20,3187,3188,3192,3194,3196,3202,3204,3206,3212,3216,3220],{},[23,3189,1678,3190,1681],{},[50,3191,208],{},[23,3193,1684],{},[23,3195,1687],{},[23,3197,1690,3198,506,3200,1695],{},[50,3199,723],{},[50,3201,14],{},[23,3203,1698],{},[23,3205,1701],{},[23,3207,1704,3208,986,3210,1695],{},[50,3209,775],{},[50,3211,819],{},[23,3213,1711,3214,1714],{},[50,3215,1033],{},[23,3217,1717,3218,1695],{},[50,3219,291],{},[23,3221,1722],{},[11,3223,3224,3226],{"id":1725,"level":14},[16,3225,1729],{"id":1728},[93,3227,3228,3232,3236,3240,3244,3250,3258],{},[23,3229,1734,3230],{},[50,3231,80],{},[23,3233,1739,3234],{},[50,3235,1742],{},[23,3237,1745,3238],{},[50,3239,1748],{},[23,3241,1751,3242],{},[50,3243,1754],{},[23,3245,1757,3246,1760,3248,1764],{},[50,3247,58],{},[50,3249,1763],{},[23,3251,1767,3252,1770,3254,1760,3256],{},[50,3253,1763],{},[50,3255,1763],{},[50,3257,1775],{},[23,3259,1778,3260,1782,3262],{},[50,3261,1781],{},[50,3263,1785],{},[11,3265,3266,3268],{"id":1788,"level":14},[16,3267,1791],{"id":1788},[20,3269,3270,3272,3274,3276,3278,3280],{},[23,3271,1796],{},[23,3273,1799],{},[23,3275,1802],{},[23,3277,1805],{},[23,3279,1808],{},[23,3281,1811,3282,506,3284],{},[50,3283,1763],{},[50,3285,1775],{},[11,3287,3288,3290],{"id":1818,"level":14},[16,3289,1822],{"id":1821},[127,3291,3292,3320],{"gap":129,"left-width":130,"right-width":130},[132,3293,3294,3296,3300,3304,3308,3312,3316],{"v-slot:left":134},[136,3295,1829],{"id":1818},[89,3297,3298,1836],{},[1833,3299,1835],{},[89,3301,3302,1842],{},[1833,3303,1841],{},[89,3305,3306,1848],{},[1833,3307,1847],{},[89,3309,3310,1854],{},[1833,3311,1853],{},[89,3313,3314,1860],{},[1833,3315,1859],{},[89,3317,3318,1866],{},[1833,3319,1865],{},[132,3321,3322,3324],{"v-slot:right":134},[136,3323,1872],{"id":1871},[20,3325,3326,3331,3336,3341,3346,3351,3356],{},[23,3327,3328],{},[1878,3329,1883],{"href":1880,"rel":3330},[1882],[23,3332,3333],{},[1878,3334,1890],{"href":1888,"rel":3335},[1882],[23,3337,3338],{},[1878,3339,1897],{"href":1895,"rel":3340},[1882],[23,3342,3343],{},[1878,3344,1904],{"href":1902,"rel":3345},[1882],[23,3347,3348],{},[1878,3349,1911],{"href":1909,"rel":3350},[1882],[23,3352,3353],{},[1878,3354,1918],{"href":1916,"rel":3355},[1882],[23,3357,3358],{},[1878,3359,1925],{"href":1923,"rel":3360},[1882],{"title":134,"searchDepth":1927,"depth":1927,"links":3362},[3363,3364,3365,3366,3367,3368,3369,3370,3371,3372,3373,3374,3375,3376,3377,3378,3379,3380,3381,3382,3383,3384,3385,3386,3387,3388,3389,3390,3391,3392,3393,3394,3395],{"id":13,"depth":1927,"text":18},{"id":40,"depth":1927,"text":43},{"id":84,"depth":1927,"text":87},{"id":124,"depth":1927,"text":125},{"id":185,"depth":1927,"text":188},{"id":256,"depth":1927,"text":259},{"id":266,"depth":1927,"text":269},{"id":334,"depth":1927,"text":100},{"id":404,"depth":1927,"text":405},{"id":490,"depth":1927,"text":491},{"id":542,"depth":1927,"text":545},{"id":635,"depth":1927,"text":636},{"id":688,"depth":1927,"text":691},{"id":738,"depth":1927,"text":739},{"id":836,"depth":1927,"text":839},{"id":896,"depth":1927,"text":899},{"id":952,"depth":1927,"text":955},{"id":1014,"depth":1927,"text":1015},{"id":1075,"depth":1927,"text":1078},{"id":1120,"depth":1927,"text":1123},{"id":1187,"depth":1927,"text":1190},{"id":1352,"depth":1927,"text":1355},{"id":1430,"depth":1927,"text":1433},{"id":1459,"depth":1927,"text":1460},{"id":1501,"depth":1927,"text":1504},{"id":1546,"depth":1927,"text":1547},{"id":1588,"depth":1927,"text":1589},{"id":1619,"depth":1927,"text":1622},{"id":1652,"depth":1927,"text":1655},{"id":1670,"depth":1927,"text":1673},{"id":1728,"depth":1927,"text":1729},{"id":1788,"depth":1927,"text":1791},{"id":1821,"depth":1927,"text":1822},{},{"title":5,"description":1964},[138,161,1979,1980],{"id":3400,"title":3401,"audience":6,"body":3402,"contentType":1962,"course":1963,"description":4651,"estimateBasis":4652,"estimatedDiscussionMinutes":1972,"estimatedLiveMinutes":4653,"estimatedTotalMinutes":4654,"extension":1969,"meta":4655,"module":14,"navigation":1971,"order":4656,"path":4657,"promptAssist":1974,"seo":4658,"status":1976,"stem":4659,"tags":4660,"videoDuration":4664,"videoId":4665,"videoLink":4666,"videoTitle":4667,"week":14,"__hash__":4668},"content\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions.md","Use Conditions Loops And Functions",{"type":8,"value":3403,"toc":4610},[3404,3425,3457,3535,3567,3612,3657,3702,3742,3803,3851,3919,3957,4012,4056,4103,4144,4185,4224,4265,4295,4327,4347,4374,4404,4459,4502,4528],[11,3405,3406,3408],{"id":13,"level":14},[16,3407,18],{"id":13},[20,3409,3410,3413,3416,3419,3422],{},[23,3411,3412],{},"Conditions choose which block runs",[23,3414,3415],{},"Loops repeat work until the pattern is finished",[23,3417,3418],{},"Functions name reusable logic",[23,3420,3421],{},"PHP and JavaScript use similar control-flow ideas with different syntax",[23,3423,3424],{},"In this lesson, compare the patterns before using them in practice files",[11,3426,3427,3429],{"id":40,"level":14},[16,3428,43],{"id":40},[20,3430,3431,3435,3440,3442,3450,3453],{},[23,3432,48,3433],{},[50,3434,52],{},[23,3436,55,3437],{},[50,3438,3439],{},"Module02-Control-Flow-Functions",[23,3441,61],{},[23,3443,64,3444,68,3447],{},[50,3445,3446],{},"control-flow-",[50,3448,3449],{},"control-flow-even-odd.php",[23,3451,3452],{},"Keep each practice file focused on one idea",[23,3454,77,3455,81],{},[50,3456,80],{},[11,3458,3460,3463],{"id":3459,"level":14},"loop-types",[16,3461,3462],{"id":3459},"Loop Types",[127,3464,3465,3500],{"gap":129,"left-width":130,"right-width":130},[132,3466,3467,3471],{"v-slot:left":134},[136,3468,3470],{"id":3469},"use-these-in-php","Use These In PHP",[20,3472,3473,3479,3485,3491,3497],{},[23,3474,3475,3478],{},[50,3476,3477],{},"for",": use when a counter, index, or fixed number of passes matters",[23,3480,3481,3484],{},[50,3482,3483],{},"while",": use when the loop should continue as long as a condition stays true",[23,3486,3487,3490],{},[50,3488,3489],{},"do while",": use when the body must run once before the condition is checked",[23,3492,3493,3496],{},[50,3494,3495],{},"foreach",": use when reading each array value or each key\u002Fvalue pair",[23,3498,3499],{},"Update loop variables inside the loop so it can finish",[132,3501,3502,3506],{"v-slot:right":134},[136,3503,3505],{"id":3504},"use-these-in-javascript","Use These In JavaScript",[20,3507,3508,3512,3516,3520,3526,3532],{},[23,3509,3510,3478],{},[50,3511,3477],{},[23,3513,3514,3484],{},[50,3515,3483],{},[23,3517,3518,3490],{},[50,3519,3489],{},[23,3521,3522,3525],{},[50,3523,3524],{},"for...of",": use for array values and other iterable values",[23,3527,3528,3531],{},[50,3529,3530],{},"for...in",": use for object keys or property names",[23,3533,3534],{},"Avoid loop conditions that can never become false",[11,3536,3538,3545],{"id":3537,"level":14},"for-vs-foreach",[16,3539,3540,3542,3543],{"id":3537},[50,3541,3477],{}," Vs ",[50,3544,3495],{},[127,3546,3547,3557],{"gap":129,"left-width":130,"right-width":130},[132,3548,3549,3554],{"v-slot:left":134},[89,3550,325,3551,3553],{},[50,3552,3477],{}," when the counter matters:",[198,3555],{"language":138,"src":3556},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Ffor-vs-foreach-06.php",[132,3558,3559,3564],{"v-slot:right":134},[89,3560,325,3561,3563],{},[50,3562,3495],{}," when the values matter:",[198,3565],{"language":138,"src":3566},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Ffor-vs-foreach-07.php",[11,3568,3570,3577],{"id":3569,"level":14},"while-and-do-while",[16,3571,3572,3574,3575],{"id":3569},[50,3573,3483],{}," And ",[50,3576,3489],{},[127,3578,3579,3586],{"gap":129,"left-width":130,"right-width":130},[132,3580,3581,3583],{"v-slot:left":134},[136,3582,139],{"id":138},[198,3584],{"language":138,"src":3585},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fwhile-and-do-while-17.php",[132,3587,3588,3590,3593,3596],{"v-slot:right":134},[136,3589,162],{"id":161},[198,3591],{"language":380,"src":3592},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fwhile-and-do-while-18.js",[89,3594,3595],{},"Both versions:",[20,3597,3598,3601,3604,3607],{},[23,3599,3600],{},"Start with a counter",[23,3602,3603],{},"Check a condition",[23,3605,3606],{},"Update the counter",[23,3608,3609,3611],{},[50,3610,3489],{}," runs at least once",[11,3613,3615,3622],{"id":3614,"level":14},"foreach-key-value",[16,3616,3618,3619,3621],{"id":3617},"php-foreach-key-and-value","PHP ",[50,3620,3495],{}," Key And Value",[127,3623,3624,3629],{"gap":129,"left-width":639,"right-width":640},[132,3625,3626],{"v-slot:left":134},[198,3627],{"language":138,"src":3628},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fforeach-key-value-19.php",[132,3630,3631,3634],{"v-slot:right":134},[89,3632,3633],{},"Two common forms:",[20,3635,3636,3642,3648,3651,3654],{},[23,3637,3638,3641],{},[50,3639,3640],{},"foreach ($items as $value)",": use when each value is enough",[23,3643,3644,3647],{},[50,3645,3646],{},"foreach ($items as $key => $value)",": use when the key matters",[23,3649,3650],{},"Use key\u002Fvalue loops for associative arrays",[23,3652,3653],{},"Later database rows are arrays with column names as keys",[23,3655,3656],{},"Read values from the array; avoid changing the source array unless that is the point",[11,3658,3660,3668],{"id":3659,"level":14},"for-in-vs-for-of",[16,3661,3663,3664,3542,3666],{"id":3662},"javascript-forin-vs-forof","JavaScript ",[50,3665,3530],{},[50,3667,3524],{},[127,3669,3670,3675],{"gap":129,"left-width":639,"right-width":640},[132,3671,3672],{"v-slot:left":134},[198,3673],{"language":380,"src":3674},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Ffor-in-vs-for-of-20.js",[132,3676,3677,3680],{"v-slot:right":134},[89,3678,3679],{},"Practical rule:",[20,3681,3682,3687,3692,3697],{},[23,3683,3684,3686],{},[50,3685,3524],{},": values from an array or iterable",[23,3688,3689,3691],{},[50,3690,3530],{},": keys or property names",[23,3693,325,3694,3696],{},[50,3695,3524],{}," for most array value loops",[23,3698,3699,3701],{},[50,3700,3530],{}," can include custom properties",[11,3703,3705,3709],{"id":3704,"level":14},"modulo-and-loop",[16,3706,3708],{"id":3707},"even-and-odd-loop","Even And Odd Loop",[127,3710,3711,3716],{"gap":129,"left-width":130,"right-width":130},[132,3712,3713],{"v-slot:left":134},[198,3714],{"language":138,"src":3715},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Feven-and-odd-loop-04.php",[132,3717,3718,3720,3723,3726],{"v-slot:right":134},[89,3719,710],{},[198,3721],{"language":520,"src":3722},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fexample-output-05.txt",[89,3724,3725],{},"Notes:",[20,3727,3728,3732,3737],{},[23,3729,3730,1234],{},[50,3731,1233],{},[23,3733,3734,3736],{},[50,3735,3495],{},": loop through each array value",[23,3738,3739,3741],{},[50,3740,1155],{},": compare value and type",[11,3743,3745,3748,3753],{"id":3744,"level":14},"loop-risk-examples",[16,3746,3747],{"id":3744},"Loop Risk Examples",[1644,3749,3750],{"type":1646},[89,3751,3752],{},"Read these as risk examples. Do not run them in a normal browser request unless the instructor explicitly asks you to test a controlled version.",[127,3754,3755,3780],{"gap":129,"left-width":130,"right-width":130},[132,3756,3757,3763,3766],{"v-slot:left":134},[136,3758,3760,3761],{"id":3759},"infinite-while","Infinite ",[50,3762,3483],{},[198,3764],{"language":138,"src":3765},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Finfinite-while-example-25.php",[20,3767,3768,3771,3777],{},[23,3769,3770],{},"The condition starts true",[23,3772,3773,3776],{},[50,3774,3775],{},"true"," never becomes false",[23,3778,3779],{},"The page keeps printing until PHP stops the request",[132,3781,3782,3787,3790],{"v-slot:right":134},[136,3783,3760,3785],{"id":3784},"infinite-for",[50,3786,3477],{},[198,3788],{"language":138,"src":3789},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Finfinite-for-example-26.php",[20,3791,3792,3798,3801],{},[23,3793,3794,3797],{},[50,3795,3796],{},"for (;;)"," has no setup, condition, or update sections",[23,3799,3800],{},"No condition means there is no planned stopping point",[23,3802,3779],{},[11,3804,3806,3809],{"id":3805,"level":632},"growing-array-loop",[16,3807,3808],{"id":3805},"Growing Array Loop",[127,3810,3813,3818],{"gap":129,"left-width":3811,"right-width":3812},"1.05fr","0.95fr",[132,3814,3815],{"v-slot:left":134},[198,3816],{"language":138,"src":3817},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fgrowing-array-loop-27.php",[132,3819,3820,3823],{"v-slot:right":134},[89,3821,3822],{},"Why this is dangerous:",[20,3824,3825,3831,3837,3845,3848],{},[23,3826,3827,3830],{},[50,3828,3829],{},"count($a)"," is recalculated on each pass",[23,3832,3833,3836],{},[50,3834,3835],{},"array_push($a, $i)"," makes the array longer",[23,3838,3839,506,3842,3844],{},[50,3840,3841],{},"$i",[50,3843,3829],{}," both keep increasing",[23,3846,3847],{},"The loop does not reach a normal stopping point",[23,3849,3850],{},"It is not truly infinite because PHP eventually stops when memory or execution time runs out",[11,3852,3854,3857],{"id":3853,"level":14},"flow-control-summary",[16,3855,3856],{"id":3853},"Flow Control Summary",[127,3858,3859,3894],{"gap":129,"left-width":130,"right-width":130},[132,3860,3861,3865],{"v-slot:left":134},[136,3862,3864],{"id":3863},"decision-tools","Decision Tools",[20,3866,3867,3873,3882,3888],{},[23,3868,3869,3872],{},[50,3870,3871],{},"if",": run a block when a condition is true",[23,3874,3875,424,3878,3881],{},[50,3876,3877],{},"elseif",[50,3879,3880],{},"else if",": test another condition",[23,3883,3884,3887],{},[50,3885,3886],{},"else",": fallback when no condition matched",[23,3889,3890,3893],{},[50,3891,3892],{},"switch",": compare one value to several cases",[132,3895,3896,3900],{"v-slot:right":134},[136,3897,3899],{"id":3898},"risk-to-watch","Risk To Watch",[20,3901,3902,3905,3908,3916],{},[23,3903,3904],{},"First matching branch wins",[23,3906,3907],{},"Bad branch order can create dead code",[23,3909,3910,3912,3913],{},[50,3911,3892],{}," can fall through without ",[50,3914,3915],{},"break",[23,3917,3918],{},"Predict the output before running the page",[11,3920,3922,3925],{"id":3921,"level":14},"condition-example",[16,3923,3924],{"id":3921},"Condition Example",[127,3926,3927,3932],{"gap":129,"left-width":130,"right-width":130},[132,3928,3929],{"v-slot:left":134},[198,3930],{"language":138,"src":3931},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fcondition-example-01.php",[132,3933,3934,3936,3939,3941],{"v-slot:right":134},[89,3935,710],{},[198,3937],{"language":520,"src":3938},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fexample-output-02.txt",[89,3940,3725],{},[20,3942,3943,3946,3949,3952],{},[23,3944,3945],{},"First true branch runs",[23,3947,3948],{},"Later branches are skipped",[23,3950,3951],{},"Branch order matters",[23,3953,3954,3956],{},[50,3955,3877],{}," is checked only if earlier checks failed",[11,3958,3960,3963],{"id":3959,"level":14},"comparison-risk",[16,3961,3962],{"id":3959},"Comparison Risk",[127,3964,3965,3970],{"gap":129,"left-width":130,"right-width":130},[132,3966,3967],{"v-slot:left":134},[198,3968],{"language":138,"src":3969},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fcomparison-risk-03.php",[132,3971,3972,3975,3995,3998],{"v-slot:right":134},[89,3973,3974],{},"Problem:",[20,3976,3977,3986,3989],{},[23,3978,3979,3982,3983],{},[50,3980,3981],{},"95"," is already ",[50,3984,3985],{},">= 60",[23,3987,3988],{},"First branch catches it",[23,3990,3991,3994],{},[50,3992,3993],{},"Excellent"," can never print",[89,3996,3997],{},"Correction:",[20,3999,4000,4003,4006],{},[23,4001,4002],{},"Check the most specific condition first",[23,4004,4005],{},"Use the broad fallback later",[23,4007,4008,4009,4011],{},"The skipped ",[50,4010,3993],{}," branch is dead code because the earlier branch catches the value first",[11,4013,4015,4020],{"id":4014,"level":14},"switch-example",[16,4016,4017,4019],{"id":4014},[50,4018,3892],{}," Example",[127,4021,4022,4027],{"gap":129,"left-width":130,"right-width":130},[132,4023,4024],{"v-slot:left":134},[198,4025],{"language":138,"src":4026},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fswitch-example-15.php",[132,4028,4029,4031],{"v-slot:right":134},[89,4030,650],{},[20,4032,4033,4038,4043,4049],{},[23,4034,4035,4037],{},[50,4036,3892],{}," compares one value against several cases",[23,4039,4040,4042],{},[50,4041,3915],{}," stops fall-through into the next case",[23,4044,4045,4048],{},[50,4046,4047],{},"default"," is the fallback",[23,4050,325,4051,1227,4053,4055],{},[50,4052,3871],{},[50,4054,3877],{}," when each condition checks something different",[11,4057,4059,4068],{"id":4058,"level":14},"switch-fallthrough",[16,4060,4062,4063,4065,4066],{"id":4061},"missing-break-in-switch","Missing ",[50,4064,3915],{}," In ",[50,4067,3892],{},[127,4069,4070,4075],{"gap":129,"left-width":130,"right-width":130},[132,4071,4072],{"v-slot:left":134},[198,4073],{"language":138,"src":4074},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fswitch-fallthrough-16.php",[132,4076,4077,4080],{"v-slot:right":134},[89,4078,4079],{},"Prediction:",[20,4081,4082,4088,4094,4100],{},[23,4083,4084,4087],{},[50,4085,4086],{},"Monday"," matches the first case",[23,4089,4090,4091,4093],{},"No ",[50,4092,3915],{}," means execution continues",[23,4095,4096,4099],{},[50,4097,4098],{},"Tuesday"," also prints",[23,4101,4102],{},"Fall-through is sometimes intentional, but only use it when you mean to group cases",[11,4104,4106,4113],{"id":4105,"level":14},"break-and-continue",[16,4107,4108,3574,4110],{"id":4105},[50,4109,3915],{},[50,4111,4112],{},"continue",[127,4114,4115,4120],{"gap":129,"left-width":130,"right-width":130},[132,4116,4117],{"v-slot:left":134},[198,4118],{"language":138,"src":4119},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fbreak-and-continue-08.php",[132,4121,4122,4124,4127,4129],{"v-slot:right":134},[89,4123,710],{},[198,4125],{"language":520,"src":4126},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fexample-output-09.txt",[89,4128,3725],{},[20,4130,4131,4136,4141],{},[23,4132,4133,4135],{},[50,4134,4112],{},": skip the rest of this loop pass",[23,4137,4138,4140],{},[50,4139,3915],{},": stop the loop completely",[23,4142,4143],{},"Use sparingly so the loop still reads clearly",[11,4145,4147,4155],{"id":4146,"level":14},"break-continue-js",[16,4148,4150,3574,4152,4154],{"id":4149},"break-and-continue-in-javascript",[50,4151,3915],{},[50,4153,4112],{}," In JavaScript",[127,4156,4157,4162],{"gap":129,"left-width":130,"right-width":130},[132,4158,4159],{"v-slot:left":134},[198,4160],{"language":380,"src":4161},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fbreak-continue-js-21.js",[132,4163,4164,4167],{"v-slot:right":134},[89,4165,4166],{},"Same control idea:",[20,4168,4169,4174,4179,4182],{},[23,4170,4171,4173],{},[50,4172,4112],{},": skip this pass",[23,4175,4176,4178],{},[50,4177,3915],{},": exit the loop",[23,4180,4181],{},"Use both carefully so the loop still reads clearly",[23,4183,4184],{},"The same ideas appear in PHP and JavaScript",[11,4186,4188,4191],{"id":4187,"level":14},"function-example",[16,4189,4190],{"id":4187},"Function Example",[127,4192,4193,4198],{"gap":129,"left-width":130,"right-width":130},[132,4194,4195],{"v-slot:left":134},[198,4196],{"language":138,"src":4197},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Ffunction-example-10.php",[132,4199,4200,4202,4205,4207],{"v-slot:right":134},[89,4201,710],{},[198,4203],{"language":520,"src":4204},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fexample-output-11.txt",[89,4206,3725],{},[20,4208,4209,4212,4215,4221],{},[23,4210,4211],{},"Function name describes the reusable job",[23,4213,4214],{},"Parameters are inputs",[23,4216,4217,4220],{},[50,4218,4219],{},"return"," sends a value back",[23,4222,4223],{},"Type hints document expected values",[11,4225,4227,4231],{"id":4226,"level":14},"same-idea-javascript",[16,4228,4230],{"id":4229},"same-idea-in-javascript","Same Idea In JavaScript",[127,4232,4233,4238],{"gap":129,"left-width":130,"right-width":130},[132,4234,4235],{"v-slot:left":134},[198,4236],{"language":380,"src":4237},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fsame-idea-in-javascript-12.js",[132,4239,4240,4243,4254,4257],{"v-slot:right":134},[89,4241,4242],{},"Same idea:",[20,4244,4245,4248,4251],{},[23,4246,4247],{},"Function accepts inputs",[23,4249,4250],{},"Function returns one result",[23,4252,4253],{},"Output goes to the browser console here",[89,4255,4256],{},"Different runtime:",[20,4258,4259,4262],{},[23,4260,4261],{},"PHP prints into the server response",[23,4263,4264],{},"JavaScript runs after the browser receives the page",[11,4266,4268,4271,4274,4290],{"id":4267,"level":14},"debugging-flow",[16,4269,4270],{"id":4267},"Debugging Flow",[89,4272,4273],{},"When output is wrong:",[93,4275,4276,4279,4282,4285,4287],{},[23,4277,4278],{},"Print the input value",[23,4280,4281],{},"Print the type if text\u002Fnumber confusion is possible",[23,4283,4284],{},"Test one condition or loop boundary",[23,4286,1639],{},[23,4288,4289],{},"Refresh or rerun",[1644,4291,4292],{"type":1646},[89,4293,4294],{},"Change one thing, then retest. Rewriting the whole example makes it harder to know which line caused the new result.",[11,4296,4298,4301],{"id":4297,"level":14},"built-in-functions-practice",[16,4299,4300],{"id":4297},"Built-in Functions Practice",[20,4302,4303,4309,4315,4321,4324],{},[23,4304,4305,4308],{},[50,4306,4307],{},"abs()",": Work with distance from zero",[23,4310,4311,4314],{},[50,4312,4313],{},"number_format()",": Display a number with a fixed number of decimal places",[23,4316,4317,4320],{},[50,4318,4319],{},"preg_replace()",": Replace text that matches a regular expression",[23,4322,4323],{},"These helpers are useful in practice work, but the exact project logic depends on the task",[23,4325,4326],{},"See the slides below for small examples of each helper",[11,4328,4330,4334,4337],{"id":4329,"level":632},"abs-example",[16,4331,4332,4019],{"id":4329},[50,4333,4307],{},[198,4335],{"language":138,"src":4336},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fabs-example-22.php",[20,4338,4339,4344],{},[23,4340,4341,4343],{},[50,4342,4307],{}," returns the positive distance from zero",[23,4345,4346],{},"This is useful when only the size of the difference matters",[11,4348,4350,4355,4358],{"id":4349,"level":632},"number-format-example",[16,4351,4353,4019],{"id":4352},"number_format-example",[50,4354,4313],{},[198,4356],{"language":138,"src":4357},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fnumber-format-example-23.php",[20,4359,4360,4365,4371],{},[23,4361,4362,4364],{},[50,4363,4313],{}," returns display text",[23,4366,4367,4368],{},"Crypto-style values often need more decimal places, such as ",[50,4369,4370],{},"8",[23,4372,4373],{},"Add the transaction first, then format the final display value",[11,4375,4377,4382,4385],{"id":4376,"level":632},"preg-replace-example",[16,4378,4380,4019],{"id":4379},"preg_replace-example",[50,4381,4319],{},[198,4383],{"language":138,"src":4384},"\u002Fgenerated-snippets\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions\u002Fpreg-replace-example-24.php",[20,4386,4387,4392,4395,4398,4401],{},[23,4388,4389,4391],{},[50,4390,4319],{}," changes text that matches a pattern",[23,4393,4394],{},"This example changes spaces to hyphens",[23,4396,4397],{},"It also changes hyphens back to spaces",[23,4399,4400],{},"Use a different pattern when the allowed text rules are different",[23,4402,4403],{},"Regular expressions will be covered separately later",[11,4405,4406,4408],{"id":1670,"level":14},[16,4407,1673],{"id":1670},[20,4409,4410,4416,4421,4429,4435,4443,4450,4456],{},[23,4411,4412,4413,4415],{},"Which branch runs first in an ",[50,4414,3871],{}," chain?",[23,4417,4418,4419,4415],{},"What is dead code in an ",[50,4420,3871],{},[23,4422,4423,4424,4426,4427,1695],{},"Why does a ",[50,4425,3892],{}," case usually need ",[50,4428,3915],{},[23,4430,4431,4432,4434],{},"What does ",[50,4433,1233],{}," tell you?",[23,4436,4437,4438,4440,4441,1695],{},"When is ",[50,4439,3495],{}," cleaner than ",[50,4442,3477],{},[23,4444,4445,4446,506,4448,1695],{},"What is the difference between JavaScript ",[50,4447,3530],{},[50,4449,3524],{},[23,4451,1690,4452,506,4454,1695],{},[50,4453,3915],{},[50,4455,4112],{},[23,4457,4458],{},"Why move repeated logic into a function?",[11,4460,4461,4463],{"id":1725,"level":14},[16,4462,1729],{"id":1728},[93,4464,4465,4469,4473,4477,4482,4488,4496],{},[23,4466,1734,4467],{},[50,4468,80],{},[23,4470,1739,4471],{},[50,4472,1742],{},[23,4474,1745,4475],{},[50,4476,1748],{},[23,4478,1751,4479],{},[50,4480,4481],{},"git push origin Module02-Control-Flow-Functions",[23,4483,1757,4484,1760,4486,1764],{},[50,4485,3439],{},[50,4487,1763],{},[23,4489,1767,4490,1770,4492,1760,4494],{},[50,4491,1763],{},[50,4493,1763],{},[50,4495,1775],{},[23,4497,1778,4498,1782,4500],{},[50,4499,1781],{},[50,4501,1785],{},[11,4503,4504,4506],{"id":1788,"level":14},[16,4505,1791],{"id":1788},[20,4507,4508,4511,4514,4519,4522,4525],{},[23,4509,4510],{},"Conditions choose between branches",[23,4512,4513],{},"Loop choice depends on whether the counter, condition, value, or key matters",[23,4515,4516,4518],{},[50,4517,3495],{}," is the normal PHP choice for reading array values",[23,4520,4521],{},"Functions make repeated logic easier to test and reuse",[23,4523,4524],{},"Small helper functions can prepare numbers or text before output",[23,4526,4527],{},"Debug control-flow problems by checking one input, one condition, or one loop boundary at a time",[11,4529,4530,4532],{"id":1818,"level":14},[16,4531,1822],{"id":1821},[127,4533,4534,4562],{"gap":129,"left-width":130,"right-width":130},[132,4535,4536,4538,4544,4550,4556],{"v-slot:left":134},[136,4537,1829],{"id":1818},[89,4539,4540,4543],{},[1833,4541,4542],{},"Condition"," - A true\u002Ffalse check that controls which code runs",[89,4545,4546,4549],{},[1833,4547,4548],{},"Loop"," - Code that repeats while a pattern continues",[89,4551,4552,4555],{},[1833,4553,4554],{},"Dead code"," - Code that cannot run because earlier logic prevents it",[89,4557,4558,4561],{},[1833,4559,4560],{},"Function"," - Named reusable logic with optional inputs and a result",[132,4563,4564,4566],{"v-slot:right":134},[136,4565,1872],{"id":1871},[20,4567,4568,4575,4582,4589,4596,4603],{},[23,4569,4570],{},[1878,4571,4574],{"href":4572,"rel":4573},"https:\u002F\u002Fwww.php.net\u002Fmanual\u002Fen\u002Fcontrol-structures.if.php",[1882],"PHP Manual: if",[23,4576,4577],{},[1878,4578,4581],{"href":4579,"rel":4580},"https:\u002F\u002Fwww.php.net\u002Fmanual\u002Fen\u002Fcontrol-structures.foreach.php",[1882],"PHP Manual: foreach",[23,4583,4584],{},[1878,4585,4588],{"href":4586,"rel":4587},"https:\u002F\u002Fwww.php.net\u002Fmanual\u002Fen\u002Fcontrol-structures.switch.php",[1882],"PHP Manual: switch",[23,4590,4591],{},[1878,4592,4595],{"href":4593,"rel":4594},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FJavaScript\u002FGuide\u002FLoops_and_iteration",[1882],"MDN: Loops and iteration",[23,4597,4598],{},[1878,4599,4602],{"href":4600,"rel":4601},"https:\u002F\u002Fwww.php.net\u002Fmanual\u002Fen\u002Ffunctions.user-defined.php",[1882],"PHP Manual: functions",[23,4604,4605],{},[1878,4606,4609],{"href":4607,"rel":4608},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FJavaScript\u002FGuide\u002FFunctions",[1882],"MDN: JavaScript functions",{"title":134,"searchDepth":1927,"depth":1927,"links":4611},[4612,4613,4614,4615,4617,4619,4621,4623,4624,4625,4626,4627,4628,4629,4631,4633,4635,4637,4638,4639,4640,4641,4643,4645,4647,4648,4649,4650],{"id":13,"depth":1927,"text":18},{"id":40,"depth":1927,"text":43},{"id":3459,"depth":1927,"text":3462},{"id":3537,"depth":1927,"text":4616},"for Vs foreach",{"id":3569,"depth":1927,"text":4618},"while And do while",{"id":3617,"depth":1927,"text":4620},"PHP foreach Key And Value",{"id":3662,"depth":1927,"text":4622},"JavaScript for...in Vs for...of",{"id":3707,"depth":1927,"text":3708},{"id":3744,"depth":1927,"text":3747},{"id":3805,"depth":1927,"text":3808},{"id":3853,"depth":1927,"text":3856},{"id":3921,"depth":1927,"text":3924},{"id":3959,"depth":1927,"text":3962},{"id":4014,"depth":1927,"text":4630},"switch Example",{"id":4061,"depth":1927,"text":4632},"Missing break In switch",{"id":4105,"depth":1927,"text":4634},"break And continue",{"id":4149,"depth":1927,"text":4636},"break And continue In JavaScript",{"id":4187,"depth":1927,"text":4190},{"id":4229,"depth":1927,"text":4230},{"id":4267,"depth":1927,"text":4270},{"id":4297,"depth":1927,"text":4300},{"id":4329,"depth":1927,"text":4642},"abs() Example",{"id":4352,"depth":1927,"text":4644},"number_format() Example",{"id":4379,"depth":1927,"text":4646},"preg_replace() Example",{"id":1670,"depth":1927,"text":1673},{"id":1728,"depth":1927,"text":1729},{"id":1788,"depth":1927,"text":1791},{"id":1821,"depth":1927,"text":1822},"Practice decisions, repetition, and reusable logic with small PHP and JavaScript examples that produce visible output.","Face-to-face class of about 40 students; includes prediction prompts, short coding checks, debugging discussion, and comparison between PHP and JavaScript.","65","75",{},"20","\u002Finternet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions",{"title":3401,"description":4651},"internet-applications\u002Fpresentations\u002F02-php-and-javascript-basics\u002F02-conditions-loops-functions",[138,4661,4662,4663],"conditions","loops","functions","1:01:13","aTmU0kABQms","https:\u002F\u002Fyoutu.be\u002FaTmU0kABQms","Conditions Loops and Functions","qaCmjtbulmPmiFJ-F5imZHK9Q2JoKEDvzB78n7TlMWk",[],1780581681717]