3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @author lolkittens * @copyright 2016 */ echo "<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title>TODO.todo</title></head> <body> <style> .project { line-height: 4px; } .bullet-done { font-weight: bold; font-style: normal; color: rgba(0,114,62,1.0); } .note{ display: block; color: rgba(133,130,102,1.0); font-weight: normal; font-style: normal; } .todo { display: inline-block; } .tag { font-weight: bold; font-style: normal; color: rgba(160,46,43,0.6); } body { background: rgba(239,233,183,1.0); color: rgba(0,0,0,0.31); font-weight: normal; font-style: normal; } h1 { font-weight: bold; font-style: normal; background: rgba(0,0,0,0.06); color: rgba(188,100,74,1.0); width: 100%; line-height: 34px; } .tab{ display: inline-block; width:0px; height: 0px; background: #000000; </style><pre>"; $todo = 'Version 1: This file is in TaskPaper format. Tabs are used to indent. Each task begins with a "- ". Projects end with a ":". Tags are in the format "@tag_name". All other lines (such as these) are considered as notes, and are to be ignored. - User signup - Register for an account - Log in @done - Forget password - Manage users - Create users @in_progress - Delete users - User profile page @40% - Blog - Creating new posts @done - Comments @done - Moderating comments @done This is my todo list: This is a note about the list. - this is an item @done - and this is @me this is a note about my done item - this is the last @java @shopping @item @done This is a second list: - Add more funk to something @work @java - Send something somewhere @work @email @due(12 Aug 07) - this is an example - dfgdfg ggg hfghf - hgh - dfygdfgdf List: - gdfgdf `inline code` hhf - gdfgdf - dfgdfg @done '; echo get_marked_up_todo($todo); echo '</pre></body></html>'; function get_marked_up_todo($todo){ $todo = htmlspecialchars($todo,ENT_QUOTES)."\n\n"; $search = array('/(.+:)(.+)\n\n/sU', // Get projects '/(- ([^\@\n]+).+)/', // Get todos '/(.+:)/', // Get headings '/\n([^\<\n].+)/', // Get notes '/- (.+@done)/', // Get done '/(@due\([^\)]+\))/', // Get due tags '/(@(?!due)[^\s]+)/', // Get tags "/\t/", '/`(.*?)`/', // inline code ); $replace = array("<div class=\"project\">\n$1$2\n</div>\n\n", '<span class="todo"><input type="checkbox" value="'.trim('\2').'"> \1</span>', '<h1>\1</h1>', "\n\t<span class=\"note\">$1</span>", '<span class="bullet-done">? ? ??</span> - <strike>\1</strike>', '<span class="tag due">\1</span>', '<span class="tag">\1</span>', "\t<span class=\"tab\"></span>", '<code>\1</code>', ); return preg_replace($search, $replace, $todo); } ?>

Abusive script

This script was stopped while abusing our resources

Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.30, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.29, 8.2.0 - 8.2.23, 8.3.0 - 8.3.11
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title>TODO.todo</title></head> <body> <style> .project { line-height: 4px; } .bullet-done { font-weight: bold; font-style: normal; color: rgba(0,114,62,1.0); } .note{ display: block; color: rgba(133,130,102,1.0); font-weight: normal; font-style: normal; } .todo { display: inline-block; } .tag { font-weight: bold; font-style: normal; color: rgba(160,46,43,0.6); } body { background: rgba(239,233,183,1.0); color: rgba(0,0,0,0.31); font-weight: normal; font-style: normal; } h1 { font-weight: bold; font-style: normal; background: rgba(0,0,0,0.06); color: rgba(188,100,74,1.0); width: 100%; line-height: 34px; } .tab{ display: inline-block; width:0px; height: 0px; background: #000000; </style><pre><div class="project"> <h1>Version 1:</h1> <span class="tab"></span><span class="note">This file is in TaskPaper format.</span> <span class="tab"></span><span class="note">Tabs are used to indent.</span> <span class="tab"></span><span class="note"> Each task begins with a &quot;<span class="todo"><input type="checkbox" value="&quot;"> - &quot;.</span></span> <h1>Projects end with a &quot;:</h1>&quot;. <span class="tab"></span><span class="note">Tags are in the format &quot;<span class="tag">@tag_name&quot;.</span></span> <span class="tab"></span><span class="note">All other lines (such as these) are considered as notes,</span> <span class="tab"></span><span class="note">and are to be ignored.</span> </div> <div class="project"> <span class="todo"><input type="checkbox" value="User signu"> - User signup</span> <span class="todo"><input type="checkbox" value="Register for an accoun"> - Register for an account</span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="Log in "> <span class="bullet-done">? ? ??</span> - <strike>Log in <span class="tag">@done</strike></span></span></span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="Forget passwor"> - Forget password</span></span> <span class="todo"><input type="checkbox" value="Manage user"> - Manage users</span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="Create users "> - Create users <span class="tag">@in_progress</span></span></span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="Delete user"> - Delete users</span></span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="User profile page "> - User profile page <span class="tag">@40%</span></span></span> <span class="todo"><input type="checkbox" value="Blo"> - Blog</span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="Creating new posts "> <span class="bullet-done">? ? ??</span> - <strike>Creating new posts <span class="tag">@done</strike></span></span></span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="Comments "> <span class="bullet-done">? ? ??</span> - <strike>Comments <span class="tag">@done</strike></span></span></span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="Moderating comments "> <span class="bullet-done">? ? ??</span> - <strike>Moderating comments <span class="tag">@done</strike></span></span></span> <span class="tab"></span><span class="note"> </span> <h1>This is my todo list:</h1> <span class="tab"></span><span class="note"> <span class="tab"></span>This is a note about the list.</span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="this is an item "> <span class="bullet-done">? ? ??</span> - <strike>this is an item <span class="tag">@done</strike></span></span></span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="and this is "> - and this is <span class="tag">@me</span> </span></span> <span class="tab"></span><span class="note">this is a note about my done item</span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="this is the last "> <span class="bullet-done">? ? ??</span> - <strike>this is the last <span class="tag">@java</span> <span class="tag">@shopping</span> <span class="tag">@item</span> <span class="tag">@done</strike></span></span></span> </div> <div class="project"> <h1>This is a second list:</h1> <span class="todo"><input type="checkbox" value="Add more funk to something "> - Add more funk to something <span class="tag">@work</span> <span class="tag">@java</span> </span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="Send something somewhere "> - Send something somewhere <span class="tag">@work</span> <span class="tag">@email</span> <span class="tag due">@due(12 Aug 07)</span></span></span> <span class="tab"></span><span class="note"> <span class="todo"><input type="checkbox" value="this is an exampl"> - this is an example</span></span> <span class="todo"><input type="checkbox" value="dfgdf"> - dfgdfg</span> <span class="tab"></span><span class="note">ggg</span> <span class="tab"></span><span class="note">hfghf </span> <span class="todo"><input type="checkbox" value="hg"> - hgh</span> <span class="todo"><input type="checkbox" value="dfygdfgd"> - dfygdfgdf</span> </div> <div class="project"> <h1>List:</h1> <span class="todo"><input type="checkbox" value="gdfgdf <code>inline code</code> hh"> - gdfgdf <code>inline code</code> hhf</span> <span class="todo"><input type="checkbox" value="gdfgd"> - gdfgdf</span> <span class="todo"><input type="checkbox" value="dfgdfg "> <span class="bullet-done">? ? ??</span> - <strike>dfgdfg <span class="tag">@done</strike></span></span> <span class="tab"></span><span class="note"> </span> </div> </pre></body></html>
Output for 4.3.0 - 4.3.1
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title>TODO.todo</title></head> <body> <style> .project { line-height: 4px; } .bullet-done { font-weight: bold; font-style: normal; color: rgba(0,114,62,1.0); } .note{ display: block; color: rgba(133,130,102,1.0); font-weight: normal; font-style: normal; } .todo { display: inline-block; } .tag { font-weight: bold; font-style: normal; color: rgba(160,46,43,0.6); } body { background: rgba(239,233,183,1.0); color: rgba(0,0,0,0.31); font-weight: normal; font-style: normal; } h1 { font-weight: bold; font-style: normal; background: rgba(0,0,0,0.06); color: rgba(188,100,74,1.0); width: 100%; line-height: 34px; } .tab{ display: inline-block; width:0px; height: 0px; background: #000000; </style><pre>
Process exited with code 139.

preferences:
136.67 ms | 416 KiB | 5 Q