3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $ch = curl_init(); $url = 'https://labs.eucon.com/api/api/ProcessService/WorkItems/move'; curl_setopt($ch, CURLOPT_URL, $url); $username = 'win-4k9l0k8l9d0\VinnaUser'; $password = 'Vinna2015'; curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM); curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password); $requestHeaders = ['Content-Type' => 'application/json', 'Cache-control: no-cache']; curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders); $body = '{"WorkItemID":62,"ActivityInstanceID":73,"ProcessID":13,"ProcessName":null,"DocumentID":"b6653a56-9869-436e-829d-ac7dbc5bb7f6","RoleInstanceID":null,"Status":1,"Message":"Suspended","ExpirationDate":"2015-11-04T04:23:09.853","DateCreated":"0001-01-01T00:00:00","ActivityName":null,"IsChild":false,"TimeStamp":"","Metadata":[{"PropertyName":"WorkItemID","DisplayName":"WorkItemID","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"ActivityInstanceID","DisplayName":"ActivityInstanceID","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"ProcessID","DisplayName":"ProcessID","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"ProcessName","DisplayName":"ProcessName","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"DocumentID","DisplayName":"DocumentID","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"RoleInstanceID","DisplayName":"RoleInstanceID","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"Status","DisplayName":"Status","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"Message","DisplayName":"Message","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"ExpirationDate","DisplayName":"ExpirationDate","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"DateCreated","DisplayName":"DateCreated","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"ActivityName","DisplayName":"ActivityName","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"IsChild","DisplayName":"IsChild","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"TimeStamp","DisplayName":"TimeStamp","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":null},{"PropertyName":"TimeStampBytes","DisplayName":"TimeStampBytes","InputType":0,"GroupName":null,"Order":0,"UseVariable":false,"IsReadOnly":false,"IsRequired":false,"Validations":[]}],"TypeIdentifier":"DtoWorkItemData"}'; curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $body); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, true); #put response headers in $response as well as the raw response body $response = curl_exec($ch); var_dump('<pre>' . $response . '</pre>'); curl_close($ch);
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/T88Bc:3 Stack trace: #0 {main} thrown in /in/T88Bc on line 3
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Call to undefined function curl_init() in /in/T88Bc on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/T88Bc on line 13
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/T88Bc on line 13
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/T88Bc on line 13
Process exited with code 255.