Hey, I'm building my own platform mainly for a project, but, for my own personal use as well.. I'm also changing the style of programming that I do it in, and, setting up some rules..
I just wondered if there are any disadvantages to the way that I am setting things out:
Everything in functions, no "stray" code and a different formatting to if statements:
<?php
$app = new StdClass;
function compare($number1, $number2)
{
if($number1 > $number2):
return true;
else:
return false;
endif;
}
function main()
{
// Main is automatically outputted.
// And, for the application to work must be initalised.
$app->Number1 = 19;
$app->Number2 = 3;
if(compare($app->Number1, $app->Number2)):
echo 'Yes';
else:
echo 'No';
endif;
return 1;
}
?>
Can anyone see any problems with using this style? =)