3v4l.org

run code in 300+ PHP versions simultaneously
<?php $postdata = http_build_query( array( 'format' => 'csv', 'data' => '3GNDA13D76S000000;5XYKT3A12CG000000' ) ); $opts = array('http' => array( 'method' => 'POST', 'content' => $postdata ) ); $apiURL = "https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/"; $context = stream_context_create($opts); $fp = fopen($apiURL, 'rb', false, $context); if(!$fp) { echo "in first if"; } $response = @stream_get_contents($fp); if($response == false) { echo "in second if"; } echo $response; ?>
Output for git.master, git.master_jit
Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/XGPe0 on line 16 Warning: fopen(): open_basedir restriction in effect. File(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/XGPe0 on line 16 Warning: fopen(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/): Failed to open stream: Operation not permitted in /in/XGPe0 on line 16 in first if Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given in /in/XGPe0:21 Stack trace: #0 /in/XGPe0(21): stream_get_contents(false) #1 {main} thrown in /in/XGPe0 on line 21
Process exited with code 255.
Output for rfc.property-hooks
Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/XGPe0 on line 16 Warning: fopen(): open_basedir restriction in effect. File(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/XGPe0 on line 16 Warning: fopen(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/): Failed to open stream: Operation not permitted in /in/XGPe0 on line 16 in first if Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, false given in /in/XGPe0:21 Stack trace: #0 /in/XGPe0(21): stream_get_contents(false) #1 {main} thrown in /in/XGPe0 on line 21
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:
44.18 ms | 402 KiB | 8 Q