3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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; ?>
based on hBstr
Output for 7.3.0rc3
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 ifin second if
Output for 7.3.0alpha1 - 7.3.0beta1
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(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/): failed to open stream: No such file or directory in /in/XGPe0 on line 16 in first ifin second if
Output for 7.1.20, 7.2.6
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) 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 ifin second if
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.10, 7.2.0
Warning: fopen(): php_network_getaddresses: getaddrinfo failed: System error in /in/XGPe0 on line 16 Warning: fopen(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/XGPe0 on line 16 in first ifin second if
Output for hhvm-3.15.4
Warning: Failed to open https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/ (Could not resolve host: vpic.nhtsa.dot.gov) in /in/XGPe0 on line 16 in first ifin second if