3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $serviceURL = "https://development.avalara.net"; $accountNumber = "1234567890"; $licenseKey = "A1B2C3D4E5F6G7H8"; $uri = $_POST['uri']; $method = $_POST['method']; $request = $_POST['request']; $url = $serviceURL . "/1.0/" . $uri; $curl = curl_init(); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($curl, CURLOPT_USERPWD, $accountNumber . ":" . $licenseKey); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); if ($method == 'POST') { curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $request); } $curl_response = curl_exec($curl); curl_close($curl); echo $curl_response; ?>
Output for 7.0.0 - 7.2.6
Notice: Undefined index: uri in /in/aksbv on line 5 Notice: Undefined index: method in /in/aksbv on line 6 Notice: Undefined index: request in /in/aksbv on line 7 Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/aksbv:9 Stack trace: #0 {main} thrown in /in/aksbv on line 9
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Notice: Undefined index: uri in /in/aksbv on line 5 Notice: Undefined index: method in /in/aksbv on line 6 Notice: Undefined index: request in /in/aksbv on line 7 Fatal error: Call to undefined function curl_init() in /in/aksbv on line 9
Process exited with code 255.
Output for 5.0.0 - 5.2.17
Notice: Undefined index: uri in /in/aksbv on line 5 Notice: Undefined index: method in /in/aksbv on line 6 Notice: Undefined index: request in /in/aksbv on line 7 Fatal error: Call to undefined function curl_init() in /in/aksbv on line 9
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined index: uri in /in/aksbv on line 5 Notice: Undefined index: method in /in/aksbv on line 6 Notice: Undefined index: request in /in/aksbv on line 7 Fatal error: Call to undefined function: curl_init() in /in/aksbv on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Undefined index: uri in /in/aksbv on line 5 Notice: Undefined index: method in /in/aksbv on line 6 Notice: Undefined index: request in /in/aksbv on line 7 Fatal error: Call to undefined function: curl_init() in /in/aksbv on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined index: uri in /in/aksbv on line 5 Notice: Undefined index: method in /in/aksbv on line 6 Notice: Undefined index: request in /in/aksbv on line 7 Fatal error: Call to undefined function: curl_init() in /in/aksbv on line 9