3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data['vendor_id'] = 415; $data['vendor_auth_code'] = '4205:42e7aaa88b48137a16a1acd04ed9112520dd4dd5865055a091a6e8548220aca3'; $data['product_id'] = '493518'; $data['webhook_url'] = 'http://mysite.com/callback'; // URL to call when product is purchased // You must provide at least one price for the checkout, here we are setting multiple for different currencies. $data['prices'] = ['USD:4.99']; $data['expires'] = '2015-09-20'; // YYYY-MM-DD // This is where we specify the other participants that we wish to split earnings with $data['affiliates'] = [ '11740:0.30', // Vendor 11740 gets 30% ]; // You (requester) gets 70% // Here we make the request to the Paddle API $url = 'https://vendors.paddle.com/api/2.0/product/generate_pay_link'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); $response = curl_exec($ch); // And handle the response... $data = json_decode($response); if($data->success) { echo "Success! Checkout URL:".$data->response->url; } else { echo "Your request failed with error: ".$data->error->message; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/i8rFF:15 Stack trace: #0 {main} thrown in /in/i8rFF on line 15
Process exited with code 255.

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:
55.89 ms | 401 KiB | 8 Q