Thursday, September 6, 2012

Non Alpha Numeric PHP Code

PHP

After reading the nice Tutorial made by Gareth Heyes Click Here

i tried doing his challenge and to reduce the charset. Here's what I wrote:

<?php
$_++; //1
$_=$_.[]; // To Aarray
$__++; // 1
$___=$_[$__];//access the 1 index of the string "1Array" which is "A"
$__++;
$____=$____=$_[$__];//access the 2 index of the string "1Array" which is "r"
$_____=$____;// assign "r" to a new variable
$_____++;//increment to "s"
$______=$___;//new variable for "e"
$______++;$______++;$______++;$______++;//increment to "e"
$__________=$___;// = e
$__________++;$__________++;$__________++;$__________++;++$__________;++$__________;++$__________;$____________=++$__________ ;//i
++$__________;++$__________;++$__________;++$__________;$_____________=++$__________;++$__________;++$__________; // p
$_=$___.$_____.$_____.$______.$____.++$_____;//concat the strings to form "AssErt"

// Creating the Chr funktion
$__++; //1
$__=$__.[]; // To Aarray
echo $__;
$_______________++; // 1
$___=$__[$_______________++]; // A
$_____=$__[$_______________]; // r

$___++;$___++; // C
$____=$___;
$____++;$____++;$____++;$____++;$____++;
$__=$___.$____.$_____;

// Zahlen anlegen
$_______________________++;$_______________________++; //2
$________________________++;$________________________++;$________________________++; //3
$_________________________=$________________________; //3
$_________________________+=$_______________________; //5
$__________________________=$_________________________+$_________________________; //10


//P
$____________________________________=$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$__________________________;
//R
$____________________________________+$_______________________;
//I
$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$________________________;
//N
$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$_________________________+$________________________;
//T
$____________________________________+$_______________________+$_______________________;
// whitespace
$__________________________+$__________________________;
//1
$______________________________________________________++;
//+
$__________________________+$__________________________+$__________________________+$__________________________+$________________________;
//; =59
$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$_________________________+$_______________________+$_______________________;

$_($__($____________________________________).$__($____________________________________+$_______________________).$__($__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$________________________).$__($__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$_________________________+$________________________).$__($____________________________________+$_______________________+$_______________________).$__($__________________________+$__________________________).$______________________________________________________.$__($__________________________+$__________________________+$__________________________+$__________________________+$________________________).$______________________________________________________.$__($__________________________+$__________________________+$__________________________+$__________________________+$__________________________+$_________________________+$_______________________+$_______________________));


It looks more difficult than it is, because I used the chr function for every character which is not necessary. 


No comments:

Post a Comment