@ 2013-11-21T00:05:29Z <?php
$js_date = "12.12.2013";
$js_time = "10.00";
public function linkify($value, $protocols = array('http', 'mail'), array $attributes = array())
{
// Link attributes
$attr = 'http://www.abctehno.ee';
foreach ($attributes as $key => $val) {
$attr = ' ' . $key . '="' . htmlentities($val) . '"';
}
$links = array();
// Extract existing links and tags
$value = preg_replace_callback('~(<a .*?>.*?</a>|<.*?>)~i', function ($match) use (&$links) { return '<' . array_push($links, $match[1]) . '>'; }, $value);
// Extract text links for each protocol
foreach ((array)$protocols as $protocol) {
switch ($protocol) {
case 'http':
case 'https': $value = preg_replace_callback('~(?:(https?)://([^\s<]+)|(www\.[^\s<]+?\.[^\s<]+))(?<![\.,:])~i', function ($match) use ($protocol, &$links, $attr) { if ($match[1]) $protocol = $match[1]; $link = $match[2] ?: $match[3]; return '<' . array_push($links, "<a $attr href=\"$protocol://$link\">$link</a>") . '>'; }, $value); break;
case 'mail': $value = preg_replace_callback('~([^\s<]+?@[^\s<]+?\.[^\s<]+)(?<![\.,:])~', function ($match) use (&$links, $attr) { return '<' . array_push($links, "<a $attr href=\"mailto:{$match[1]}\">{$match[1]}</a>") . '>'; }, $value); break;
case 'twitter': $value = preg_replace_callback('~(?<!\w)[@#](\w++)~', function ($match) use (&$links, $attr) { return '<' . array_push($links, "<a $attr href=\"https://twitter.com/" . ($match[0][0] == '@' ? '' : 'search/%23') . $match[1] . "\">{$match[0]}</a>") . '>'; }, $value); break;
default: $value = preg_replace_callback('~' . preg_quote($protocol, '~') . '://([^\s<]+?)(?<![\.,:])~i', function ($match) use ($protocol, &$links, $attr) { return '<' . array_push($links, "<a $attr href=\"$protocol://{$match[1]}\">{$match[1]}</a>") . '>'; }, $value); break;
}
}
// Insert all link
return preg_replace_callback('/<(\d+)>/', function ($match) use (&$links) { return $links[$match[1] - 1]; }, $value);
}
$email_message ="\n Lugupeetud klient, \n \n teile broneeritud ülevaatuse aeg on ".$js_date." kell ".$js_time.". ABC Tehno asub aadressil Sõpruse pst 27, tel: 6 999 227, email: info@abctehno.ee, koduleht: ".$page. ".\n Tuletame meelde, et hilinemisel kaotab broneering kehtivuse. \n \n Kohtumiseni, \n ABC Tehno";
echo $email_message; ?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
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).
Version System time (s) User time (s) Memory (MiB) 5.4.22 0.013 0.039 12.37 5.4.21 0.009 0.043 12.37 5.4.20 0.011 0.058 12.37 5.4.19 0.009 0.055 12.36 5.4.18 0.014 0.053 12.36 5.4.17 0.012 0.047 12.37 5.4.16 0.013 0.043 12.36 5.4.15 0.011 0.047 12.36 5.4.14 0.010 0.050 12.05 5.4.13 0.011 0.051 12.03 5.4.12 0.013 0.044 12.00 5.4.11 0.010 0.051 11.99 5.4.10 0.010 0.047 12.00 5.4.9 0.008 0.048 12.00 5.4.8 0.013 0.041 11.99 5.4.7 0.014 0.042 11.99 5.4.6 0.011 0.043 12.00 5.4.5 0.011 0.043 11.99 5.4.4 0.011 0.059 11.98 5.4.3 0.012 0.044 11.98 5.4.2 0.013 0.049 11.97 5.4.1 0.013 0.043 11.98 5.4.0 0.011 0.046 11.47 5.3.27 0.011 0.047 12.72 5.3.26 0.013 0.045 12.72 5.3.25 0.013 0.044 12.72 5.3.24 0.012 0.047 12.72 5.3.23 0.011 0.047 12.71 5.3.22 0.014 0.047 12.68 5.3.21 0.012 0.043 12.68 5.3.20 0.014 0.041 12.68 5.3.19 0.011 0.051 12.68 5.3.18 0.013 0.046 12.67 5.3.17 0.013 0.046 12.67 5.3.16 0.010 0.043 12.67 5.3.15 0.013 0.043 12.67 5.3.14 0.015 0.041 12.66 5.3.13 0.012 0.048 12.66 5.3.12 0.012 0.047 12.66 5.3.11 0.010 0.045 12.66 5.3.10 0.011 0.046 12.12 5.3.9 0.014 0.043 12.08 5.3.8 0.013 0.045 12.07 5.3.7 0.011 0.044 12.07 5.3.6 0.013 0.048 12.07 5.3.5 0.012 0.046 12.00 5.3.4 0.013 0.048 12.00 5.3.3 0.017 0.059 11.94 5.3.2 0.011 0.060 11.71 5.3.1 0.014 0.046 11.67 5.3.0 0.011 0.045 11.66
preferences:dark mode live preview
141.55 ms | 1394 KiB | 7 Q