Tuesday, July 19, 2016

Intro to PHP

Learning PHP is delightfully less challenging than I thought it would be, given I've already studied other programming languages.  It's definitely the case that each new language approached is easier to use than the one prior....  Some idiosyncratic syntactical quirks include the period-style concatenation.  Otherwise, there is always the $output = sprintf("With result: %s and %s", $var1, $var2);

Also, PHP doesn't seem very strict, which actually may make things more difficult in a way....  We'll see.

I'm working on a program that will try to utilize global, static and local variables, reviewing the differences and ways to utilize these, but within multi-nested for loops and conditionals, it has sometimes been difficult to determine with certainty.  Specifically, I'm producing a labyrinth for this week's assignment.  So far, I have not been clever enough to give it a randomly generated circuitous pathway, as I had intended, so it's not very impressive and merely showcases the elements, variables, loops and statement types we're studying this week.  While it looks pretty pathetic, it's actually been fun to try to see how many ridiculous conditionals I can produce in the futile attempt to make it challenging.  Here is one random instance; just imagine really high walls and intimidating creatures roaming within:

No comments:

Post a Comment