3v4l.org

run code in 300+ PHP versions simultaneously
<? $token = 'be172a73a9e1f002be93b869d60af992'; $marker = '28184'; $aParams = array( 'search[params_attributes][origin_name]' => 'MOW', 'search[params_attributes][destination_name]' => 'LED', 'search[params_attributes][depart_date]' => '2014-04-04', 'search[params_attributes][range]' => '0', 'search[params_attributes][adults]' => '1', 'search[params_attributes][children]' => '0', 'search[params_attributes][infants]' => '0', 'search[params_attributes][trip_class]' => '0', 'search[params_attributes][direct]' => '0', ); ksort($aParams); $signature = md5("$token:$marker:".implode(':', array_values($aParams))); $bParams = array( 'signature' => $signature, 'enable_api_auth' => true, 'marker' => $marker ); $aParams = $aParams + $bParams; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://nano.aviasales.ru/searches.json'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($aParams)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FAILONERROR, 1); $answer = curl_exec($ch); if(curl_errno($ch)) echo 'Curl error: ' . curl_error($ch); curl_close($ch); echo $answer; ?>
Output for git.master, git.master_jit, rfc.property-hooks
<? $token = 'be172a73a9e1f002be93b869d60af992'; $marker = '28184'; $aParams = array( 'search[params_attributes][origin_name]' => 'MOW', 'search[params_attributes][destination_name]' => 'LED', 'search[params_attributes][depart_date]' => '2014-04-04', 'search[params_attributes][range]' => '0', 'search[params_attributes][adults]' => '1', 'search[params_attributes][children]' => '0', 'search[params_attributes][infants]' => '0', 'search[params_attributes][trip_class]' => '0', 'search[params_attributes][direct]' => '0', ); ksort($aParams); $signature = md5("$token:$marker:".implode(':', array_values($aParams))); $bParams = array( 'signature' => $signature, 'enable_api_auth' => true, 'marker' => $marker ); $aParams = $aParams + $bParams; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://nano.aviasales.ru/searches.json'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($aParams)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FAILONERROR, 1); $answer = curl_exec($ch); if(curl_errno($ch)) echo 'Curl error: ' . curl_error($ch); curl_close($ch); echo $answer; ?>

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:
54.72 ms | 404 KiB | 8 Q