Skip to content

Instantly share code, notes, and snippets.

@sele-nap
Last active March 24, 2022 20:43
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 sele-nap/0c72cbe89c326a7044079acfe0d49a3b to your computer and use it in GitHub Desktop.
Save sele-nap/0c72cbe89c326a7044079acfe0d49a3b to your computer and use it in GitHub Desktop.
WCS quest // 3. Les chaînes de caractères en PHP
<?php
$text1 = "0@sn9sirppa@#?ia'jgtvryko1";
$text2 = "q8e?wsellecif@#?sel@#?setuotpazdsy0*b9+mw@x1vj";
$text3 = "aopi?sgnirts@#?sedhtg+p9l!";
$keyNumber = strlen($text1)/2;
$subChain = substr($text1, 5,$keyNumber);
$secretMessage = str_replace('@#?', ' ', $subChain);
echo strrev($secretMessage);
?>
Message 1 : J'ai appris
Message 2 : toutes les ficelles
Message 3 : des strings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment