Created
January 14, 2019 14:12
-
-
Save GKephart/c8681a8729b018afcd7cb233da4bb127 to your computer and use it in GitHub Desktop.
quick gist since the highlight package is down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function someFunction($firstParameter, $secondParameter) { | |
$answer = 0; | |
$limit = $firstParameter + $secondParameter; | |
for($i = 0; $i < $limit; $i++) { | |
if($i % 2 === 0) { | |
$answer = $answer + ($i + 2); | |
} else { | |
$answer = $answer + ($i + 1); | |
} | |
} | |
return($answer); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment