3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function isset2($value) { if ($value == "" || $value == " " || !isset($value)) { return false; } else { return true; } } function getHexnums($value) { // Maybe this function needs a bit of explaination: // With this, you can say as $value "255,255,255", and it returns array("255", "255", "255"). # URL that generated this code: # http://txt2re.com/index-php.php3?s=255,255,255&1&2&3&-19&-18 $re1='(\\d+)'; # Integer Number 1 $re2='(,)'; # Any Single Character 1 $re3='(\\d+)'; # Integer Number 2 $re4='(,)'; # Any Single Character 2 $re5='(\\d+)'; # Integer Number 3 if ($c=preg_match_all ("/".$re1.$re2.$re3.$re4.$re5."/is", $value, $matches)) { $int1=$matches[1][0]; $c1=$matches[2][0]; $int2=$matches[3][0]; $c2=$matches[4][0]; $int3=$matches[5][0]; } return "#" . dechex($int1) . dechex($int2) . $dechex($int3); } if (file_exists('php://stdin')) { $skinini = file_get_contents('php://stdin'); $iniconv = parse_ini_string($skinini); $themexml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <hexis> <theme version=\"1.0\"> <meta> <name>" . ((isset2($iniconv["Name"])) ? $iniconv["Name"] : "none") . "</name> <creator>" . ((isset2($iniconv["Author"])) ? $iniconv["Author"] : "none") . " (autoconverted by osu2hexis.thehowl.it)</creator> </meta> <cursor rotate=" . ((isset2($iniconv["CursorRotate"])) ? $iniconv["CursorRotate"] : "1") . " expand=" . ((isset2($iniconv["CursorExpand"])) ? $iniconv["CursorExpand"] : "1") . " color=\"#FFFFFF\"> <trail length=\"0\" color=\"#FFFFFF\" opacity=\"0\" /> </cursor> <playfield> <set> <color color=" . ((isset2($iniconv["Combo1"])) ? getHexnums($iniconv["Combo1"]) : "#FFFFFF") . " /> <color color=" . ((isset2($iniconv["Combo2"])) ? getHexnums($iniconv["Combo2"]) : "#FFFFFF") . " /> <color color=" . ((isset2($iniconv["Combo3"])) ? getHexnums($iniconv["Combo3"]) : "#FFFFFF") . " /> <color color=" . ((isset2($iniconv["Combo4"])) ? getHexnums($iniconv["Combo4"]) : "#FFFFFF") . " /> </set> <slider> <border color=" . ((isset2($iniconv["SliderBorder"])) ? getHexnums($iniconv["SliderBorder"]) : "#FFFFFF") . " /> <track override=\"1\" color=\"#000000\" /> <track " . ((isset2($iniconv["SliderTrackOverride"])) ? "override=\"1\" color=\"" . $iniconv["Combo1"] . "\"" : "override=\"0\" color=\"#000000\"") . " /> </slider> <font> <combo prefix=\"combo\" kerning=\"0\" /> <score prefix=\"score\" kerning=\"0\" /> </font> </playfield> </theme> </hexis>"; echo $themexml; } ?>
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Output for hhvm-3.10.0

Process exited with code 153.