Skip to content

Instantly share code, notes, and snippets.

@hackvan
Last active December 13, 2018 02:28
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 hackvan/91273a7f6fb0949d8a89c52b357b0cae to your computer and use it in GitHub Desktop.
Save hackvan/91273a7f6fb0949d8a89c52b357b0cae to your computer and use it in GitHub Desktop.
code = "<?php \n"
code += " $x = 0; \n"
(1..3).each do |n|
code += " $x = $x + #{n}; \n"
end
code += " print($x); \n?>"
File.open("dummy.php", 'w') { |file| file.write(code) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment