3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $token = "bot448828288:AAGiqKvcNpZWvwrGNrRkpiETihFhIVpWtQA"; $chatid = "@cointweets"; $text = "Hello!"; $chat_id = @cointweets; $text = 'your text goes here'; $disable_web_page_preview = null; $reply_to_message_id = null; $reply_markup = null; $data = array( 'chat_id' => urlencode($chat_id), 'text' => urlencode($text), 'disable_web_page_preview' => urlencode($disable_web_page_preview), 'reply_to_message_id' => urlencode($reply_to_message_id), 'reply_markup' => urlencode($reply_markup) ); $url = https://api.telegram.org/bot448828288:AAGiqKvcNpZWvwrGNrRkpiETihFhIVpWtQA/sendMessage; // open connection $ch = curl_init(); // set the url curl_setopt($ch, CURLOPT_URL, $url); // number of POST vars curl_setopt($ch, CURLOPT_POST, count($fields)); // POST data curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); // To display result of curl curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // execute post $result = curl_exec($ch); // close connection curl_close($ch); ?>
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.7
Parse error: syntax error, unexpected ':' in /in/jT8Tr on line 22
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: syntax error, unexpected ':' in /in/jT8Tr:22 Stack trace: #0 {main}
Process exited with code 255.