On friendfeed, we can see this link & mdash; The140CharactersWebappChallenge !, This competition requires 140 characters of code to create a web application. There are 36 programs available for voting, basically all of which are a collection of scripting languages: php, perl, ruby, ja... "> <LINKhref =
You can see this link on friendfeed -- The 140 Characters Webapp Challenge !, This competition requires 140 characters of code to create a web application.
There are 36 programs available for voting, basically all of which are a collection of scripting languages: php, perl, ruby, and javascript. There are also a wide variety of applications, including photo albums, twitter-like games, and even php code frameworks? The excerpt is as follows:
Require _ DIR _. '/c. php ';
If (! Is_callable ($ c =@$ _ GET ['c']? : Function () {echo 'Woah! ';}))
Throw new Exception ('error ');
$ C ();
This code utilizes some new features of php5.3:
_ DIR __
Anonymous functions
? : Operator
The code contains only 131 characters. because the code is very simple and the security is not guaranteed, it can only be regarded as a unified entry for one program.
If you use php 5.2 to write this code, it is probably:
Require dirname (_ FILE _). '/c. php ';
If (! Is_callable ($ c =@$ _ GET ['c']? $ _ GET ['c']: create_function (''," echo 'Woah! ';")))
Throw new Exception ('error ');
$ C ();
If you want to make this code more practical, you can add a prefix before $ c, which will further improve the security and add several bytes to the code.