3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ThreePointStudio_CustomMarkupForUser_Constants { public static $availableMarkups = array( // Text Effects "bold" => array( "format" => array( array("span", array("style" => array("font-weight" => array("bold")))) ), ), "italic" => array( "format" => array( array("span", array("style" => array("font-style" => array("italic")))) ), ), "underline" => array( "format" => array( array("span", array("style" => array("text-decoration" => array("underline"))), array('mergeProperties' => true)) ), ), "overline" => array( "format" => array( array("span", array("style" => array("text-decoration" => array("overline"))), array('mergeProperties' => true)) ), ), "strike" => array( "format" => array( array("span", array("style" => array("text-decoration" => array("line-through"))), array('mergeProperties' => true)) ), ), "text_colour" => array( "format" => array( array("span", array("style" => array("color" => array("{_value}"))), array("variableFeed" => array("_value"))) ), ), "font_face" => array( "format" => array( array("span", array("style" => array("font-family" => array("{fontFamily}"))), array("variableFeed" => array("fontFamily"))) ), ), // Background and Borders "background_colour" => array( "format" => array( array("span", array("style" => array("background-color" => array("{_value}"))), array("variableFeed" => array("_value"))) ), ), "border" => array( "format" => array( array("span", array("class" => array("borderText"))) ), ), "border_colour" => array( "format" => array( array("span", array("style" => array("border-color" => array("{_value}"))), array("variableFeed" => array("_value"))) ), ), "border_style" => array( "format" => array( array("span", array("style" => array("border-style" => array("{borderStyle}"))), array("variableFeed" => array("borderStyle"))) ), ), ); public static $borderList = array( 0 => "none", 1 => "dotted", 2 => "dashed", 3 => "solid", 4 => "double", 5 => "groove", 6 => "ridge", 7 => "inset", 8 => "outset" ); // Mostly copied from http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html public static $fontList = array( 0 => array("name" => "", "fullname" => "inherit"), 1 => array("name" => "Arial", "fullname" => 'Arial, Helvetica, sans-serif'), 2 => array("name" => "Arial Black", "fullname" => "'Arial Black', Gadget, sans-serif"), 3 => array("name" => "Comic Sans MS", "fullname" => "'Comic Sans MS', cursive, sans-serif"), 4 => array("name" => "Courier New", "fullname" => "'Courier New', Courier, monospace"), 5 => array("name" => "Georgia", "fullname" => 'Georgia, serif'), 6 => array("name" => "Impact", "fullname" => 'Impact, Charcoal, sans-serif'), 7 => array("name" => "Lucida Console", "fullname" => "'Lucida Console', Monaco, monospace"), 8 => array("name" => "Lucida Sans Unicode", "fullname" => "'Lucida Sans Unicode', 'Lucida Grande', sans-serif"), 9 => array("name" => "Palatino Linotype", "fullname" => "'Palatino Linotype', 'Book Antiqua', Palatino, serif"), 10 => array("name" => "Tahoma", "fullname" => 'Tahoma, Geneva, sans-serif'), 11 => array("name" => "Times New Roman", "fullname" => "'Times New Roman', Times, serif"), 12 => array("name" => "Trebuchet MS", "fullname" => "'Trebuchet MS', Helvetica, sans-serif"), 13 => array("name" => "Verdana", "fullname" => 'Verdana, Geneva, sans-serif'), ); public static $defaultOptionsArray = array( "username" => array(), "usertitle" => array() ); } $options = unserialize('a:2:{s:8:"username";a:9:{s:4:"bold";i:1;s:6:"italic";i:1;s:9:"underline";i:1;s:11:"text_colour";s:7:"#e01be0";s:9:"font_face";i:13;s:17:"background_colour";s:7:"#4683ab";s:6:"border";i:1;s:13:"border_colour";s:7:"#d91fd9";s:12:"border_style";i:1;}s:9:"usertitle";a:6:{s:4:"bold";i:1;s:6:"italic";i:1;s:9:"underline";i:1;s:6:"strike";i:1;s:8:"overline";i:1;s:9:"font_face";i:3;}}'); $sortedTags = $firstOccurrence = array(); foreach ($options[$category] as $optionName => $optionValue) { end($sortedTags); foreach (ThreePointStudio_CustomMarkupForUser_Constants::$availableMarkups[$optionName]["format"] as $tag) { $sortedTags[] = $tag; end($sortedTags); $index = key($sortedTags); $theTag = &$sortedTags[$index]; if (!in_array($theTag[0], $firstOccurrence)) { $firstOccurrence[$theTag[0]] = $index; } else { // Try to see if we can merge the properties if (isset($theTag[2]["loneTag"]) && $theTag[2]["loneTag"]) { // It wants it own tag continue; } $firstOccurrenceTag = &$sortedTags[$firstOccurrence[$theTag[0]]]; $intersection = array_keys(array_intersect_key($theTag[1], $firstOccurrenceTag[1])); if (in_array("style", $intersection)) { if ((isset($theTag[2]["mergeProperties"]) && $theTag[2]["mergeProperties"]) && (isset($firstOccurrenceTag[2]["mergeProperties"]) && $firstOccurrenceTag[2]["mergeProperties"])) { $firstOccurrenceTag[1]["style"] = array_replace_recursive($firstOccurrenceTag[1]["style"], $theTag[1]["style"]); } else { $firstOccurrenceTag[1]["style"] = array_replace($firstOccurrenceTag[1]["style"], $theTag[1]["style"]); } unset($theTag[1]["style"]); } if (in_array("class", $intersection)) { $firstOccurrenceTag[1]["class"] = array_replace($firstOccurrenceTag[1]["class"], $theTag[1]["class"]); unset($theTag[1]["class"]); } // Try to put anything that is not in the first occurrence tag into the first occurrence tag instead foreach ($theTag[1] as $attr => $attrValue) { if (!in_array($attr, array_keys($firstOccurrenceTag[1]))) { $firstOccurrenceTag[1][$attr] = $attrValue; unset($theTag[1][$attr]); } } if (empty($theTag[1])) { // No attr, drop the tag unset($sortedTags[$index]); end($sortedTags); continue; } // What is left is conflicted attributes. Leave as is in its own tag. } } } var_dump($sortedTags);

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.60.0000.01618.56
8.3.50.0120.00822.11
8.3.40.0070.00718.79
8.3.30.0040.01119.21
8.3.20.0000.00720.34
8.3.10.0060.00322.09
8.3.00.0100.00022.36
8.2.180.0070.01417.00
8.2.170.0140.00722.96
8.2.160.0070.00720.89
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0060.00319.48
8.2.110.0090.00022.20
8.2.100.0120.00017.93
8.2.90.0040.00419.22
8.2.80.0030.00517.97
8.2.70.0000.00817.47
8.2.60.0040.00418.04
8.2.50.0050.00518.07
8.2.40.0030.00518.22
8.2.30.0050.00318.18
8.2.20.0000.00817.85
8.2.10.0040.00417.88
8.2.00.0040.00419.51
8.1.280.0060.01025.92
8.1.270.0040.00422.08
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00324.01
8.1.230.0080.00419.35
8.1.220.0030.00517.78
8.1.210.0030.00518.77
8.1.200.0090.00017.35
8.1.190.0000.00817.65
8.1.180.0060.00318.10
8.1.170.0040.00418.84
8.1.160.0000.00922.02
8.1.150.0050.00218.64
8.1.140.0080.00017.60
8.1.130.0040.00417.90
8.1.120.0050.00317.48
8.1.110.0000.00717.46
8.1.100.0000.00717.53
8.1.90.0000.00817.54
8.1.80.0040.00417.38
8.1.70.0030.00317.44
8.1.60.0030.00617.70
8.1.50.0040.00417.57
8.1.40.0040.00417.60
8.1.30.0060.00317.73
8.1.20.0040.00417.71
8.1.10.0040.00417.54
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0040.00417.30
8.0.280.0050.00318.53
8.0.270.0030.00317.39
8.0.260.0000.00716.97
8.0.250.0000.00717.08
8.0.240.0040.00417.16
8.0.230.0040.00316.99
8.0.220.0000.00717.03
8.0.210.0030.00317.03
8.0.200.0030.00316.96
8.0.190.0090.00017.00
8.0.180.0000.00816.96
8.0.170.0040.00417.03
8.0.160.0040.00417.09
8.0.150.0070.00417.04
8.0.140.0000.00817.02
8.0.130.0060.00013.51
8.0.120.0000.00816.99
8.0.110.0000.00716.88
8.0.100.0000.00817.15
8.0.90.0050.00216.93
8.0.80.0060.00916.93
8.0.70.0040.00416.93
8.0.60.0000.00716.84
8.0.50.0000.00717.03
8.0.30.0120.01017.07
8.0.20.0110.00717.40
8.0.10.0000.00717.13
8.0.00.0130.00516.83
7.4.330.0050.00015.16
7.4.320.0060.00016.67
7.4.300.0070.00016.66
7.4.290.0040.00416.49
7.4.280.0000.00816.68
7.4.270.0060.00316.68
7.4.260.0060.00316.62
7.4.250.0040.00416.56
7.4.240.0050.00216.61
7.4.230.0000.00716.40
7.4.220.0060.01216.73
7.4.210.0050.01016.58
7.4.200.0000.00816.66
7.4.190.0000.00716.47
7.4.160.0130.00916.80
7.4.150.0140.00317.40
7.4.140.0090.01217.86
7.4.130.0130.00316.54
7.4.120.0090.00816.60
7.4.110.0040.01216.57
7.4.100.0120.00616.68
7.4.90.0150.00316.61
7.4.80.0130.01019.39
7.4.70.0130.00516.57
7.4.60.0000.01616.56
7.4.50.0000.00416.46
7.4.40.0040.01122.77
7.4.30.0030.01516.40
7.4.10.0120.00615.14
7.4.00.0080.00815.23
7.3.330.0030.00513.38
7.3.320.0020.00313.47
7.3.310.0040.00416.50
7.3.300.0030.00316.25
7.3.290.0160.00616.29
7.3.280.0110.00816.37
7.3.270.0090.00917.40
7.3.260.0100.00716.39
7.3.250.0130.00616.36
7.3.240.0100.00616.66
7.3.230.0100.00716.39
7.3.210.0040.01416.47
7.3.200.0140.00319.39
7.3.190.0080.00816.57
7.3.180.0030.01716.59
7.3.170.0230.00016.43
7.3.160.0140.00316.39
7.3.130.0100.00314.97
7.3.120.0060.00914.83
7.3.110.0100.01014.60
7.3.100.0070.00715.05
7.3.90.0030.01415.04
7.3.80.0130.00315.03
7.3.70.0060.00714.77
7.3.60.0070.01114.79
7.3.50.0110.00314.93
7.3.40.0040.00714.98
7.3.30.0100.00314.74
7.3.20.0000.01616.50
7.3.10.0090.00516.69
7.3.00.0050.01016.55
7.2.330.0090.00916.80
7.2.320.0060.01216.50
7.2.310.0070.01116.95
7.2.300.0080.00916.50
7.2.290.0070.01016.83
7.2.260.0100.01014.78
7.2.250.0090.00915.13
7.2.240.0070.01015.04
7.2.230.0090.00614.94
7.2.220.0060.00914.83
7.2.210.0000.01614.95
7.2.200.0030.01015.22
7.2.190.0000.01514.97
7.2.180.0070.00715.18
7.2.170.0070.00714.68
7.2.160.0080.00615.10
7.2.150.0060.01016.95
7.2.140.0090.00616.86
7.2.130.0130.00316.91
7.2.120.0110.00516.87
7.2.110.0080.00716.73
7.2.100.0090.00516.82
7.2.90.0030.01017.02
7.2.80.0080.00916.80
7.2.70.0080.00616.84
7.2.60.0060.00816.86
7.2.50.0050.00816.62
7.2.40.0070.01016.80
7.2.30.0080.00816.98
7.2.20.0040.01016.74
7.2.10.0100.00316.82
7.2.00.0060.00916.90
7.1.330.0060.01215.95
7.1.320.0070.01415.68
7.1.310.0060.00615.48
7.1.300.0040.01115.61
7.1.290.0070.00715.49
7.1.280.0060.00615.80
7.1.270.0000.01915.75
7.1.260.0070.00715.78
7.1.250.0060.00515.77
7.1.240.0040.00415.83
7.1.230.0040.01115.61
7.1.220.0070.01015.63
7.1.210.0030.01215.53
7.1.200.0040.01515.78
7.1.190.0000.01415.85
7.1.180.0070.00715.66
7.1.170.0030.01415.86
7.1.160.0060.00315.74
7.1.150.0100.00315.95
7.1.140.0040.01115.94
7.1.130.0150.00315.70
7.1.120.0100.00315.84
7.1.110.0040.00415.89
7.1.100.0070.01015.84
7.1.90.0060.00315.82
7.1.80.0060.01015.75
7.1.70.0030.00716.43
7.1.60.0070.01017.72
7.1.50.0080.00816.38
7.1.40.0130.00315.82
7.1.30.0110.00415.84
7.1.20.0000.01115.68
7.1.10.0040.00715.63
7.1.00.0050.04319.20
7.0.330.0110.00415.41
7.0.320.0000.01315.47
7.0.310.0000.01215.39
7.0.300.0000.01315.32
7.0.290.0040.01115.11
7.0.280.0100.00315.47
7.0.270.0080.00415.12
7.0.260.0000.00915.47
7.0.250.0050.00815.27
7.0.240.0080.00815.13
7.0.230.0060.01015.59
7.0.220.0050.00315.28
7.0.210.0000.01115.17
7.0.200.0030.00716.19
7.0.190.0000.01515.39
7.0.180.0040.01115.11
7.0.170.0070.00715.17
7.0.160.0070.00315.45
7.0.150.0060.00615.30
7.0.140.0030.04118.69
7.0.130.0000.01315.24
7.0.120.0060.00315.42
7.0.110.0070.00315.29
7.0.100.0040.01115.50
7.0.90.0000.01115.52
7.0.80.0070.00715.34
7.0.70.0040.00815.14
7.0.60.0080.04317.67
7.0.50.0060.02816.77
7.0.40.0050.02316.58
7.0.30.0130.02116.91
7.0.20.0100.03316.74
7.0.10.0050.02616.90
7.0.00.0130.04216.84
5.6.400.0060.00614.27
5.6.390.0030.00614.46
5.6.380.0030.00814.06
5.6.370.0090.00614.34
5.6.360.0090.00914.53
5.6.350.0140.00014.75
5.6.340.0090.00914.04
5.6.330.0060.00614.22
5.6.320.0030.01514.48
5.6.310.0070.00714.57
5.6.300.0080.00314.69
5.6.290.0030.00914.52
5.6.280.0050.03917.63
5.6.270.0110.00314.61
5.6.260.0080.00814.21
5.6.250.0060.00914.39
5.6.240.0100.00314.19
5.6.230.0030.01014.30
5.6.220.0090.00614.21
5.6.210.0060.03617.41
5.6.200.0100.02016.38
5.6.190.0090.02417.67
5.6.180.0270.02217.46
5.6.170.0170.03617.66
5.6.160.0050.02317.39
5.6.150.0020.04816.25
5.6.140.0070.02116.24
5.6.130.0090.03816.13
5.6.120.0080.02317.67
5.6.110.0050.04017.77
5.6.100.0070.04517.83
5.6.90.0080.03317.70
5.6.80.0050.04217.48
5.6.70.0000.01114.29
5.6.60.0000.01514.31
5.6.50.0000.01414.39
5.6.40.0100.00314.21
5.6.30.0030.01014.32
5.6.20.0070.00714.19
5.6.10.0030.01414.50
5.6.00.0040.01214.33
5.5.380.0070.00714.28
5.5.370.0030.01214.38
5.5.360.0030.01014.66
5.5.350.0130.04017.29
5.5.340.0020.02716.11
5.5.330.0110.03517.32
5.5.320.0260.02917.51
5.5.310.0100.02717.35
5.5.300.0130.04316.19
5.5.290.0130.04316.29
5.5.280.0060.02517.73
5.5.270.0140.02717.43
5.5.260.0100.04717.50
5.5.250.0120.03817.51
5.5.240.0120.03817.37
5.5.230.0070.00714.11
5.5.220.0060.00914.35
5.5.210.0040.01114.31
5.5.200.0040.01114.50
5.5.190.0080.00014.25
5.5.180.0090.00314.36
5.5.170.0090.00614.14
5.5.160.0040.00814.40
5.5.150.0100.00314.09
5.5.140.0070.00714.23
5.5.130.0030.00714.49
5.5.120.0060.00914.31
5.5.110.0040.01114.53
5.5.100.0070.01013.93
5.5.90.0000.01814.11
5.5.80.0090.00614.33
5.5.70.0080.00813.88
5.5.60.0050.00514.13
5.5.50.0040.01414.40
5.5.40.0090.00914.03
5.5.30.0060.00614.16
5.5.20.0030.00914.13
5.5.10.0060.00314.16
5.5.00.0100.00314.07
5.4.450.0300.02315.36
5.4.440.0370.02015.30
5.4.430.0490.02415.20
5.4.420.0420.02615.11
5.4.410.0570.02215.29
5.4.400.0250.02415.03
5.4.390.0320.01715.01
5.4.380.0180.03614.84
5.4.370.0180.03014.99
5.4.360.0280.03514.87
5.4.350.0250.02714.96
5.4.340.0180.03014.96
5.4.330.0060.00611.24
5.4.320.0040.02211.91
5.4.310.0020.02711.83
5.4.300.0090.02111.84
5.4.290.0040.02511.80
5.4.280.0070.02111.95
5.4.270.0080.03314.90
5.4.260.0030.03315.03
5.4.250.0060.03315.03
5.4.240.0030.03515.16
5.4.230.0130.03615.04
5.4.220.0020.04015.14
5.4.210.0130.03914.95
5.4.200.0050.03115.08
5.4.190.0090.02714.96
5.4.180.0100.02914.87
5.4.170.0070.04214.98
5.4.160.0070.03714.97
5.4.150.0050.03714.79
5.4.140.0070.03613.89
5.4.130.0100.02513.71
5.4.120.0070.02813.84
5.4.110.0050.02813.71
5.4.100.0040.03113.76
5.4.90.0060.03113.87
5.4.80.0080.03313.72
5.4.70.0070.03313.86
5.4.60.0050.03013.75
5.4.50.0080.03013.83
5.4.40.0040.03313.67
5.4.30.0070.03513.90
5.4.20.0060.03613.81
5.4.10.0050.02913.78
5.4.00.0060.03113.55
5.3.290.0080.02911.63
5.3.280.0080.03712.75
5.3.270.0080.03612.78
5.3.260.0100.04012.71
5.3.250.0110.03512.69
5.3.240.0150.03212.72
5.3.230.0070.04012.71
5.3.220.0060.03812.63
5.3.210.0050.03012.60
5.3.200.0050.02912.58
5.3.190.0080.03612.66
5.3.180.0100.02212.73
5.3.170.0080.02912.73
5.3.160.0030.03712.73
5.3.150.0100.02812.64
5.3.140.0110.03812.69
5.3.130.0070.03412.71
5.3.120.0050.03212.58
5.3.110.0090.02612.53
5.3.100.0060.03712.28
5.3.90.0100.02312.29
5.3.80.0050.03812.20
5.3.70.0080.03312.18
5.3.60.0120.02712.40
5.3.50.0050.03312.29
5.3.40.0080.03612.25
5.3.30.0050.02912.41
5.3.20.0060.02812.19
5.3.10.0040.02912.07
5.3.00.0040.03912.08
5.2.170.0130.05011.12
5.2.160.0100.03711.29
5.2.150.0070.05311.11
5.2.140.0070.04311.37
5.2.130.0030.05711.34
5.2.120.0070.05011.25
5.2.110.0030.04711.39
5.2.100.0170.04311.00
5.2.90.0130.04711.25
5.2.80.0030.04311.06
5.2.70.0100.04011.24
5.2.60.0070.05010.95
5.2.50.0030.04311.17
5.2.40.0000.04311.22
5.2.30.0070.03711.22
5.2.20.0070.05311.01
5.2.10.0070.03711.00
5.2.00.0030.04310.85
5.1.60.0100.04310.31
5.1.50.0070.0339.91
5.1.40.0000.04710.12
5.1.30.0070.04010.49
5.1.20.0070.03310.59
5.1.10.0030.05310.14
5.1.00.0030.05010.12
5.0.50.0000.0308.69
5.0.40.0030.0408.59
5.0.30.0100.0508.39
5.0.20.0030.0308.47
5.0.10.0070.0338.09
5.0.00.0070.0538.07
4.4.90.0000.0337.53
4.4.80.0030.0307.53
4.4.70.0070.0177.53
4.4.60.0030.0207.53
4.4.50.0000.0237.53
4.4.40.0030.0337.53
4.4.30.0030.0237.53
4.4.20.0030.0207.53
4.4.10.0030.0207.53
4.4.00.0030.0337.53
4.3.110.0030.0237.53
4.3.100.0030.0207.53
4.3.90.0030.0277.53
4.3.80.0100.0277.53
4.3.70.0070.0177.53
4.3.60.0000.0237.53
4.3.50.0030.0207.53
4.3.40.0070.0307.53
4.3.30.0030.0277.53
4.3.20.0000.0237.53
4.3.10.0000.0207.53
4.3.00.0070.01713.33

preferences:
50.98 ms | 401 KiB | 5 Q