3v4l.org

run code in 300+ PHP versions simultaneously
<?php $FEK_year = 2013; $url = 'http://www.et.gr/idocs-nph/search/fekForm.html'; $year = (int)$FEK_year; $resultsArray = array(array()); $index1 = 0; $index2 = 0; $FEK_year = 2013; $checkBoxIssue = NULL; $FEK_number = 1; $urlpdf = NULL; echo 'hello'; if ($year < 30) { $FEK_year = (string)(2000 + $year); } elseif ($year < 100) { $FEK_year = (string)(1900 + $year); } else { $FEK_year = (string)($year); } $fekyear = (int)$FEK_year; $data = array('year' => $FEK_year, $checkBoxIssue => 'on', 'fekNumberFrom' => $FEK_number, 'fekNumberTo' => $FEK_number, 'fekEffectiveDateFrom' => '01.01'.((string)$fekyear), 'fekEffectiveDateTo' => '31.12',((string)$fekyear), 'fekReleaseDateFrom' => '01.01'.((string)$fekyear), 'fekReleaseDateTo' => '31.12'.((string)($fekyear+1)), 'pageNumber' => '1'); // use key 'http' even if you send the request to https://... $options = array( 'http' => array( 'header' => "Accept-language: en\r\n" . "Content-type: application/x-www-form-urlencoded\r\n" . "User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36\r\n", 'method' => 'POST', 'content' => http_build_query($data) ) ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); if (strpos($result, 'Το ΦΕΚ σε PDF μορφή') !== false) { $urlpdf = 'http://www.et.gr'.substr($results, strpos($results, 'href=') + 6, strpos($results, '\" target=') - (strpos($results, 'href=') + 6)); } return $urlpdf;
Output for git.master, git.master_jit, rfc.property-hooks
hello Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.et.gr failed: System error in /in/RR1b3 on line 44 Warning: file_get_contents(http://www.et.gr/idocs-nph/search/fekForm.html): Failed to open stream: php_network_getaddresses: getaddrinfo for www.et.gr failed: System error in /in/RR1b3 on line 44

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
163.18 ms | 406 KiB | 5 Q