Skip to content

Instantly share code, notes, and snippets.

@gera3d
Created June 13, 2015 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gera3d/0a6e091b650ba87d732a to your computer and use it in GitHub Desktop.
Save gera3d/0a6e091b650ba87d732a to your computer and use it in GitHub Desktop.
Little Sample
<?php //Here is what I think you where asking me for on the reverse thing
$hello = "Hello ";
echo strrev( $hello );
$hello_back = strrev( $hello );
//Reverse the string back without using the stock function
$length = strlen($hello_back)-1;
$i = 0;
while ($i < $length+1) {
echo $hello_back[$length-$i];
$i++;
}
//Create your own custom sum function
function sum_custom($x, $y) {
$z = $x + $y;
return $z;
} ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment