3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <title>Online PHP Script Execution</title> </head> <body> <?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; ?> </body> </html>
Output for 8.3.0 - 8.3.4, 8.3.6
<html> <head> <title>Online PHP Script Execution</title> </head> <body> Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hBstr on line 21 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/hBstr on line 21 Warning: fopen(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/): Failed to open stream: Operation not permitted in /in/hBstr on line 21 in first if Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, false given in /in/hBstr:26 Stack trace: #0 /in/hBstr(26): stream_get_contents(false) #1 {main} thrown in /in/hBstr on line 26
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 <html> <head> <title>Online PHP Script Execution</title> </head> <body> Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hBstr on line 21 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/hBstr on line 21 Warning: fopen(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/): Failed to open stream: Operation not permitted in /in/hBstr on line 21 in first if Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, false given in /in/hBstr:26 Stack trace: #0 /in/hBstr(26): stream_get_contents(false) #1 {main} thrown in /in/hBstr on line 26
Process exited with code 255.
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
<html> <head> <title>Online PHP Script Execution</title> </head> <body> Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hBstr on line 21 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/hBstr on line 21 Warning: fopen(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/): Failed to open stream: Operation not permitted in /in/hBstr on line 21 in first if Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given in /in/hBstr:26 Stack trace: #0 /in/hBstr(26): stream_get_contents(false) #1 {main} thrown in /in/hBstr on line 26
Process exited with code 255.
Output for 8.0.13
<html> <head> <title>Online PHP Script Execution</title> </head> <body> Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hBstr on line 21 Warning: fopen(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/): Failed to open stream: No such file or directory in /in/hBstr on line 21 in first if Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given in /in/hBstr:26 Stack trace: #0 /in/hBstr(26): stream_get_contents(false) #1 {main} thrown in /in/hBstr on line 26
Process exited with code 255.
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 7.3.32 - 7.3.33, 7.4.33
<html> <head> <title>Online PHP Script Execution</title> </head> <body> Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hBstr on line 21 Warning: fopen(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/): failed to open stream: No such file or directory in /in/hBstr on line 21 in first ifin second if</body> </html>
Output for 5.6.0 - 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
<html> <head> <title>Online PHP Script Execution</title> </head> <body> Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hBstr on line 21 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/hBstr on line 21 Warning: fopen(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/): failed to open stream: Operation not permitted in /in/hBstr on line 21 in first ifin second if</body> </html>
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
<html> <head> <title>Online PHP Script Execution</title> </head> <body> Notice: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hBstr on line 21 Warning: fopen(https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/): failed to open stream: No such file or directory in /in/hBstr on line 21 in first ifin second if</body> </html>
Output for 4.4.5 - 4.4.9
<html> <head> <title>Online PHP Script Execution</title> </head> <body> Fatal error: Call to undefined function: http_build_query() in /in/hBstr on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
<html> <head> <title>Online PHP Script Execution</title> </head> <body> Fatal error: Call to undefined function: http_build_query() in /in/hBstr on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<html> <head> <title>Online PHP Script Execution</title> </head> <body> Fatal error: Call to undefined function: http_build_query() in /in/hBstr on line 7

preferences:
284.74 ms | 402 KiB | 453 Q