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

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.110.0100.01020.94
8.3.100.0110.00618.66
8.3.90.0150.00426.77
8.3.80.0030.00717.97
8.3.70.0110.00418.43
8.3.60.0040.01118.43
8.3.50.0130.00821.23
8.3.40.0070.00719.22
8.3.30.0120.00318.99
8.3.20.0040.00420.32
8.3.10.0040.00421.89
8.3.00.0030.00622.45
8.2.230.0080.00822.58
8.2.220.0070.01324.06
8.2.210.0080.00026.77
8.2.200.0060.00318.54
8.2.190.0090.00916.88
8.2.180.0130.00918.79
8.2.170.0080.00822.96
8.2.160.0110.00419.46
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00420.47
8.2.120.0040.00426.35
8.2.110.0070.00320.99
8.2.100.0080.00318.27
8.2.90.0040.00419.39
8.2.80.0060.00318.13
8.2.70.0060.00317.75
8.2.60.0030.00517.93
8.2.50.0000.00818.28
8.2.40.0080.00020.67
8.2.30.0000.00819.31
8.2.20.0050.00218.13
8.2.10.0000.00818.32
8.2.00.0040.00418.45
8.1.290.0090.00030.84
8.1.280.0110.00425.92
8.1.270.0080.00023.92
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.25
8.1.230.0070.00419.30
8.1.220.0030.00717.74
8.1.210.0080.00018.77
8.1.200.0060.00317.61
8.1.190.0050.00317.60
8.1.180.0000.00818.10
8.1.170.0060.00318.87
8.1.160.0000.00718.93
8.1.150.0000.00720.14
8.1.140.0040.00419.76
8.1.130.0040.00418.93
8.1.120.0070.00017.61
8.1.110.0000.00817.61
8.1.100.0040.00417.62
8.1.90.0040.00417.57
8.1.80.0040.00417.68
8.1.70.0000.00717.61
8.1.60.0030.00617.84
8.1.50.0040.00417.80
8.1.40.0040.00417.82
8.1.30.0000.00917.87
8.1.20.0000.00817.95
8.1.10.0040.00417.64
8.1.00.0000.00817.77
8.0.300.0000.00820.16
8.0.290.0060.00316.87
8.0.280.0040.00418.45
8.0.270.0030.00317.32
8.0.260.0030.00319.01
8.0.250.0030.00517.27
8.0.240.0040.00417.10
8.0.230.0000.00717.14
8.0.220.0040.00417.11
8.0.210.0030.00317.03
8.0.200.0000.00717.12
8.0.190.0000.00817.19
8.0.180.0060.00317.18
8.0.170.0000.00817.18
8.0.160.0030.00617.06
8.0.150.0080.00417.15
8.0.140.0050.00317.16
8.0.130.0030.00313.51
8.0.120.0030.00517.00
8.0.110.0000.00817.01
8.0.100.0000.00816.97
8.0.90.0020.00516.96
8.0.80.0130.00317.13
8.0.70.0070.00017.18
8.0.60.0040.00417.20
8.0.50.0040.00417.20
8.0.30.0140.00617.29
8.0.20.0130.00617.54
8.0.10.0000.00817.38
8.0.00.0090.01317.19
7.4.330.0020.00215.55
7.4.320.0050.00216.82
7.4.300.0000.00616.83
7.4.290.0000.00716.91
7.4.280.0040.00416.73
7.4.270.0030.00316.81
7.4.260.0000.00916.80
7.4.250.0070.00016.77
7.4.240.0050.00316.81
7.4.230.0070.00016.94
7.4.220.0090.00916.89
7.4.210.0090.01116.96
7.4.200.0000.00716.93
7.4.160.0120.00516.87
7.4.150.0150.00917.40
7.4.140.0110.01217.86
7.4.130.0060.01516.92
7.4.120.0120.01016.81
7.4.110.0090.00916.89
7.4.100.0070.01116.79
7.4.90.0090.00916.88
7.4.80.0100.00719.39
7.4.70.0170.00716.73
7.4.60.0070.01116.75
7.4.50.0120.00316.53
7.4.40.0060.01316.75
7.4.30.0030.01316.93
7.4.00.0100.01014.97
7.3.330.0040.00413.48
7.3.320.0030.00313.54
7.3.310.0050.00316.62
7.3.300.0080.00016.57
7.3.290.0040.00316.54
7.3.280.0110.00816.54
7.3.270.0130.01017.40
7.3.260.0090.00916.73
7.3.240.0070.01416.86
7.3.230.0120.00616.71
7.3.210.0150.00416.58
7.3.200.0030.01516.59
7.3.190.0070.01016.94
7.3.180.0030.01316.77
7.3.170.0100.00716.74
7.3.160.0070.01716.83
7.3.120.0070.01015.11
7.3.110.0050.01115.13
7.3.100.0080.00515.07
7.3.90.0080.00514.83
7.3.80.0100.00315.19
7.3.70.0090.00315.13
7.3.60.0040.00815.17
7.3.50.0050.00715.18
7.3.40.0070.00615.13
7.3.30.0080.00415.04
7.3.20.0070.00816.88
7.3.10.0070.00716.70
7.3.00.0090.00716.71
7.2.330.0150.00316.71
7.2.320.0110.00716.69
7.2.310.0140.00417.09
7.2.300.0060.01816.81
7.2.290.0100.00516.90
7.2.250.0100.00815.09
7.2.240.0070.01315.47
7.2.230.0070.01015.35
7.2.220.0030.01015.37
7.2.210.0060.01115.23
7.2.200.0030.01115.39
7.2.190.0080.00715.30
7.2.180.0030.01015.15
7.2.170.0030.01015.35
7.2.160.0060.00615.29
7.2.150.0100.00717.31
7.2.140.0040.01217.18
7.2.130.0030.00716.91
7.2.120.0060.01017.11
7.2.110.0030.00617.25
7.2.100.0000.01217.11
7.2.90.0060.00917.20
7.2.80.0070.01116.78
7.2.70.0100.01017.29
7.2.60.0060.00916.99
7.2.50.0090.00317.05
7.2.40.0000.01017.23
7.2.30.0060.00916.98
7.2.20.0060.00317.07
7.2.10.0040.00917.23
7.2.00.0070.01017.25
7.1.330.0050.01215.79
7.1.320.0050.01016.05
7.1.310.0070.00915.65
7.1.300.0040.01115.97
7.1.290.0060.00516.02
7.1.280.0060.00615.91
7.1.270.0030.01015.99
7.1.260.0050.01015.66
7.1.250.0090.00315.92
7.1.200.0060.00615.87
7.1.70.0120.00017.06
7.1.60.0110.00317.59
7.1.50.0270.06740.71
7.1.40.0170.02034.63
7.1.30.0170.02334.59
7.1.20.0200.01334.57
7.1.10.0030.01016.66
7.1.00.0070.01016.74
7.0.200.0090.00916.88
7.0.190.0130.05721.83
7.0.180.0000.01716.48
7.0.170.0030.01716.37
7.0.160.0000.02016.11
7.0.150.0030.01016.26
7.0.140.0100.01016.41
7.0.130.0500.01014.99
7.0.120.0070.01316.58
7.0.110.0000.02016.65
7.0.100.0030.01716.41
7.0.90.0070.01016.42
7.0.80.0030.01316.61
7.0.70.0070.01716.35
7.0.60.0630.01714.49
7.0.50.0070.01016.43
7.0.40.0730.01014.88
7.0.30.0530.01715.04
7.0.20.0730.00714.74
7.0.10.0670.01314.75
7.0.00.0320.00816.58
5.6.300.0100.06720.56
5.6.290.0130.06320.55
5.6.280.0270.04320.85
5.6.270.0100.08720.73
5.6.260.0170.08020.97
5.6.250.0100.08020.93
5.6.240.0200.07320.84
5.6.230.0130.07720.83
5.6.220.0070.06320.73
5.6.210.0100.07320.70
5.6.200.0300.05020.69
5.6.190.0200.08720.66
5.6.180.0170.06720.66
5.6.170.0170.06320.62
5.6.160.0030.06720.85
5.6.150.0170.07020.65
5.6.140.0070.09320.68
5.6.130.0070.06320.66
5.6.120.0000.08020.77
5.6.110.0100.06720.79
5.6.100.0200.05720.77
5.6.90.0170.06720.87
5.6.80.0030.07020.28
5.6.70.0070.07320.02
5.6.60.0130.08320.28
5.6.50.0070.06020.15
5.6.40.0030.08320.14
5.6.30.0130.06320.29
5.6.20.0130.05720.14
5.6.10.0100.07020.20
5.6.00.0170.07019.98
5.5.380.0030.08717.41
5.5.370.0170.05717.46
5.5.360.0200.05717.45
5.5.350.0170.06717.46
5.5.340.0170.07717.96
5.5.330.0170.08317.84
5.5.320.0130.07317.89
5.5.310.0100.08717.75
5.5.300.0130.05717.67
5.5.290.0200.06017.88
5.5.280.0130.06017.80
5.5.270.0200.07317.88
5.5.260.0200.07017.88
5.5.250.0200.05017.54
5.5.240.0170.06317.27
5.5.230.0070.07317.21
5.5.220.0070.09017.04
5.5.210.0030.06317.27
5.5.200.0170.06017.13
5.5.190.0100.05716.99
5.5.180.0100.06717.20
5.5.160.0000.07017.40
5.5.150.0200.05717.09
5.5.140.0130.05717.23
5.5.130.0100.06717.43
5.5.120.0230.06717.21
5.5.110.0130.05717.40
5.5.100.0030.07717.09
5.5.90.0170.05017.21
5.5.80.0030.05717.30
5.5.70.0070.06017.11
5.5.60.0130.05717.08
5.5.50.0070.08317.33
5.5.40.0000.09017.09
5.5.30.0070.08017.17
5.5.20.0100.08017.16
5.5.10.0100.05717.09
5.5.00.0030.07017.09
5.4.450.0170.07019.40
5.4.440.0170.05719.29
5.4.430.0100.08719.24
5.4.420.0070.08719.22
5.4.410.0230.06319.18
5.4.400.0230.08019.00
5.4.390.0170.08019.00
5.4.380.0070.06318.96
5.4.370.0130.06018.74
5.4.360.0070.06718.80
5.4.350.0100.08018.97
5.4.340.0030.09018.80
5.4.320.0200.07318.66
5.4.310.0070.08318.85
5.4.300.0070.06018.75
5.4.290.0130.05018.97
5.4.280.0200.07719.04
5.4.270.0070.06718.99
5.4.260.0100.07318.99
5.4.250.0100.06718.80
5.4.240.0070.07318.90
5.4.230.0200.07319.00
5.4.220.0100.06019.00
5.4.210.0100.07318.79
5.4.200.0100.08018.65
5.4.190.0070.08319.04
5.4.180.0100.07318.94
5.4.170.0130.07318.95
5.4.160.0030.06318.94
5.4.150.0100.05718.89
5.4.140.0170.07016.35
5.4.130.0030.07716.41
5.4.120.0070.06716.42
5.4.110.0130.05316.48
5.4.100.0170.06316.36
5.4.90.0130.04716.63
5.4.80.0200.06016.36
5.4.70.0170.07016.42
5.4.60.0030.06716.51
5.4.50.0030.06016.50
5.4.40.0070.05716.50
5.4.30.0100.06316.50
5.4.20.0030.07716.37
5.4.10.0100.06316.35
5.4.00.0070.05015.85
5.3.290.0100.06314.78
5.3.280.0130.05314.70
5.3.270.0100.07314.72
5.3.260.0130.05314.61
5.3.250.0030.06014.70
5.3.240.0100.06314.62
5.3.230.0100.07014.53
5.3.220.0000.06314.67
5.3.210.0030.09014.68
5.3.200.0100.05014.68
5.3.190.0030.05714.59
5.3.180.0030.05714.42
5.3.170.0070.08014.49
5.3.160.0030.06014.58
5.3.150.0000.07014.81
5.3.140.0070.05314.55
5.3.130.0070.07714.65
5.3.120.0170.04714.57
5.3.110.0100.06014.80
5.3.100.0100.05314.15
5.3.90.0100.05314.13
5.3.80.0030.06013.97
5.3.70.0230.04014.11
5.3.60.0200.07013.93
5.3.50.0100.05013.81
5.3.40.0030.08013.96
5.3.30.0170.06713.76
5.3.20.0070.05713.81
5.3.10.0170.06713.76
5.3.00.0100.05313.73
5.2.170.0070.04711.34
5.2.160.0070.06311.16
5.2.150.0070.04311.34
5.2.140.0030.07011.13
5.2.130.0070.04711.14
5.2.120.0130.05311.22
5.2.110.0170.03011.21
5.2.100.0130.05311.30
5.2.90.0070.04011.21
5.2.80.0170.04011.19
5.2.70.0130.03711.12
5.2.60.0070.06311.07
5.2.50.0100.04311.14
5.2.40.0000.04710.94
5.2.30.0100.05011.10
5.2.20.0100.04011.08
5.2.10.0130.04710.98
5.2.00.0070.04310.83
5.1.60.0070.03710.13
5.1.50.0000.04310.01
5.1.40.0170.04310.00
5.1.30.0030.05010.45
5.1.20.0070.05710.38
5.1.10.0100.03310.14
5.1.00.0030.04010.11
5.0.50.0100.0308.68
5.0.40.0000.0338.49
5.0.30.0070.0438.30
5.0.20.0030.0378.47
5.0.10.0030.0438.24
5.0.00.0000.0578.26
4.4.90.0070.0337.12
4.4.80.0030.0277.12
4.4.70.0000.0277.12
4.4.60.0000.0277.12
4.4.50.0000.0277.12
4.4.40.0030.0377.12
4.4.30.0000.0377.12
4.4.20.0000.0337.12
4.4.10.0000.0337.12
4.4.00.0100.0377.12
4.3.110.0100.0177.12
4.3.100.0100.0207.12
4.3.90.0000.0237.12
4.3.80.0030.0437.12
4.3.70.0030.0207.12
4.3.60.0030.0307.12
4.3.50.0000.0337.12
4.3.40.0000.0477.12
4.3.30.0030.0307.12
4.3.20.0100.0237.12
4.3.10.0000.0237.12
4.3.00.0000.0237.12

preferences:
121.1 ms | 403 KiB | 5 Q