Last active
March 17, 2020 07:12
-
-
Save didagu/4add27f052e1a1ca84847515976b2221 to your computer and use it in GitHub Desktop.
function that returns the string representation of the sum of those integers
This file contains 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 sumStrings($string1,$string2) { | |
$result = (int) $string1 + (int) $string2; | |
return (string) $result; | |
} | |
/* | |
* input: $string1 = "1", $string2 = "2" | |
*/ | |
/* | |
* output: "3" | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment