3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dpprice = file_get_contents("https://api.coinmarketcap.com/v1/ticker/digitalprice/", true); $price= json_decode($dpprice); $payamt =$price[0]->price_usd; $paypercent = (1/$payamt); $amtdue= $paypercent*5; $amtdue = number_format((float)$amtdue, 4, '.', ''); ?>
Output for git.master, git.master_jit
Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/9XBPg on line 3 Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/9XBPg on line 3 Warning: file_get_contents(): open_basedir restriction in effect. File(https://api.coinmarketcap.com/v1/ticker/digitalprice/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/9XBPg on line 3 Warning: file_get_contents(https://api.coinmarketcap.com/v1/ticker/digitalprice/): Failed to open stream: Operation not permitted in /in/9XBPg on line 3 Warning: Trying to access array offset on value of type null in /in/9XBPg on line 5 Warning: Attempt to read property "price_usd" on null in /in/9XBPg on line 5 Fatal error: Uncaught DivisionByZeroError: Division by zero in /in/9XBPg:6 Stack trace: #0 {main} thrown in /in/9XBPg on line 6
Process exited with code 255.
Output for rfc.property-hooks
Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/9XBPg on line 3 Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/9XBPg on line 3 Warning: file_get_contents(): open_basedir restriction in effect. File(https://api.coinmarketcap.com/v1/ticker/digitalprice/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/9XBPg on line 3 Warning: file_get_contents(https://api.coinmarketcap.com/v1/ticker/digitalprice/): Failed to open stream: Operation not permitted in /in/9XBPg on line 3 Warning: Trying to access array offset on null in /in/9XBPg on line 5 Warning: Attempt to read property "price_usd" on null in /in/9XBPg on line 5 Fatal error: Uncaught DivisionByZeroError: Division by zero in /in/9XBPg:6 Stack trace: #0 {main} thrown in /in/9XBPg on line 6
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:
176.68 ms | 409 KiB | 5 Q