3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); header('Content-Type: application/json; charset=utf-8'); $url = 'https://prayer-times-pinneberg.vercel.app/'; $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_TIMEOUT => 20, CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_USERAGENT => 'Mozilla/5.0 (PrayerTimes PHP Scraper)', ]); $html = curl_exec($ch); if ($html === false) { http_response_code(500); echo json_encode([ 'error' => 'Failed to fetch page', 'details' => curl_error($ch), ], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); curl_close($ch); exit; } $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($httpCode >= 400) { http_response_code(500); echo json_encode([ 'error' => 'Remote server returned an error', 'status_code' => $httpCode, ], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); exit; } libxml_use_internal_errors(true); $dom = new DOMDocument(); $dom->loadHTML('<?xml encoding="utf-8" ?>' . $html); $xpath = new DOMXPath($dom); foreach ($xpath->query('//script|//style|//noscript') as $node) { $node->parentNode?->removeChild($node); } $text = $dom->textContent ?? ''; $text = html_entity_decode($text, ENT_QUOTES | ENT_HTML5, 'UTF-8'); $text = preg_replace('/\s+/u', ' ', $text); $text = trim((string) $text); $patterns = [ 'fajr' => '/(?:İmsak|Imsak)[^\d]{0,40}(\d{2}:\d{2})/u', 'dhuhr' => '/(?:Öğle|Ogle)[^\d]{0,40}(\d{2}:\d{2})/u', 'asr' => '/(?:İkindi|Ikindi)[^\d]{0,40}(\d{2}:\d{2})/u', 'maghrib' => '/(?:Akşam|Aksam)[^\d]{0,40}(\d{2}:\d{2})/u', 'isha' => '/(?:Yatsı|Yatsi)[^\d]{0,40}(\d{2}:\d{2})/u', ]; $result = []; foreach ($patterns as $name => $pattern) { if (preg_match($pattern, $text, $matches)) { $result[$name] = $matches[1]; } else { $result[$name] = null; } } echo json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);

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.5.60.0110.00518.68
8.5.50.0160.00718.34
8.5.40.0170.00516.66
8.5.30.0170.00116.79
8.5.20.0280.00716.82
8.5.10.0230.00616.74
8.5.00.0070.00416.72
8.4.210.0090.00219.60
8.4.200.0170.00519.41
8.4.190.0150.00419.72
8.4.180.0130.00519.71
8.4.170.0140.00619.60
8.4.160.0110.00719.52
8.4.150.0110.00719.63
8.4.140.0150.00417.83
8.4.130.0110.00717.98
8.4.120.0150.00518.16
8.4.110.0160.00517.99
8.4.100.0160.00517.82
8.4.90.0170.00618.04
8.4.80.0170.00417.74
8.4.70.0190.00217.96
8.4.60.0140.00517.71
8.4.50.0150.00418.02
8.4.40.0170.00317.67
8.4.30.0160.00517.95
8.4.20.0170.00317.62
8.4.10.0160.00417.63
8.3.310.0140.00318.43
8.3.300.0150.00218.43
8.3.290.0160.00318.39
8.3.280.0160.00318.23
8.3.270.0160.00216.51
8.3.260.0180.00416.57
8.3.250.0190.00316.58
8.3.240.0190.00116.63
8.3.230.0200.00316.56
8.3.220.0180.00516.31
8.3.210.0160.00316.63
8.3.200.0150.00516.58
8.3.190.0130.00716.62
8.3.180.0160.00416.55
8.3.170.0180.00216.63
8.3.160.0170.00316.44
8.3.150.0160.00316.75
8.3.140.0160.00316.85
8.3.130.0150.00316.80
8.3.120.0140.00416.64
8.3.110.0130.00416.63
8.3.100.0160.00416.80
8.3.90.0120.00716.90
8.3.80.0160.00316.56
8.3.70.0170.00316.45
8.3.60.0150.00416.43
8.3.50.0130.00716.51
8.3.40.0140.00617.72
8.3.30.0130.00217.71
8.3.20.0110.00617.95
8.3.10.0160.00517.77
8.3.00.0130.00417.99
8.2.310.0110.00717.91

preferences:
35.76 ms | 739 KiB | 5 Q