Skip to content

Instantly share code, notes, and snippets.

@thunderer
Created February 16, 2018 13:40
Show Gist options
  • Save thunderer/aa92e33d17b5d0e605b9083d76dff4fe to your computer and use it in GitHub Desktop.
Save thunderer/aa92e33d17b5d0e605b9083d76dff4fe to your computer and use it in GitHub Desktop.
ReturnTrueToWin

ReturnTrueToWin

A nice little puzzle in which you need to write the code that returns true when executed in the environment described in each level. URL: https://returntrue.win.

Levels

  1. true
  2. function() { return 'true'; }
  3. true
  4. 0
  5. 'true'
  6. $x = function() use(&$x) { return $x; }
  7. (object)[true]
  8. new class extends Bar {}
  9. NAN
  10. function($x) { Closure::bind(function() { $this->a = true; }, $x, Bar::class)(); }
  11. [true]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment