3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'https://timsdevorg-developer-edition.na24.force.com/services/apexrest/cms/ocmsrest/'; $fields = array( 'service' => 'OrchestraRenderingAPI', 'apiVersion' => '5.0', 'action' => 'getRenderedContent', 'renderingRequest' => array( 'renderType' => 'originId', 'siteName' => 'OCMSCommunity', 'parameters' => array( 'renderType' => 'originId', ), 'listParameters' => array( 'contentLayouts' => array( 'CustomHtml', ), 'originIds' => array( 'a0F1a000002JDsVEAW', ), ), ), ); $fields_string = ''; foreach ($fields as $key => $value) { if (!is_array($value)) { $fields_string .= $key . '=' . $value . '&'; } else { $fields_string .= $key . '=' . json_encode($value) . '&'; } } $fields_string = rtrim($fields_string, '&'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, count($fields)); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); $result = curl_exec($ch); curl_close($ch); $obj = json_decode($result); $renderings = json_decode($obj->responseObject); foreach ($renderings as $rendering) { if (is_array($rendering)) { foreach ($rendering as $render) { foreach ($render->renderMap as $renderMap) { echo htmlspecialchars($renderMap); } } } }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/LX5pZ:37 Stack trace: #0 {main} thrown in /in/LX5pZ on line 37
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:
42.67 ms | 401 KiB | 8 Q