3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime(); $url = "https://api.uds.app/partner/v2/settings"; $uuid_v4 = 'UUID'; //generate universally unique identifier version 4 (RFC 4122) $companyId = 123; //set ID of your company $apiKey = 'ZDk1MmE5NzMtODcxNi00YzIwLTllZDMtN2ZjM2NjOGI2YTMz'; //set company apikey // Create a stream $opts = array( 'http' => array( 'method' => 'GET', 'header' => "Accept: application/json\r\n" . "Accept-Charset: utf-8\r\n" . "Authorization: Basic ". base64_encode("$companyId:$apiKey")."\r\n" . "X-Origin-Request-Id: ".$uuid_v4."\r\n" . "X-Timestamp: ".$date->format(DateTime::ATOM) ) ); $context = stream_context_create($opts); $result = file_get_contents($url, false, $context); echo $result;
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/pjpKQ on line 23 Warning: file_get_contents(): open_basedir restriction in effect. File(https://api.uds.app/partner/v2/settings) is not within the allowed path(s): (/tmp:/in:/etc) in /in/pjpKQ on line 23 Warning: file_get_contents(https://api.uds.app/partner/v2/settings): Failed to open stream: Operation not permitted in /in/pjpKQ on line 23
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
73.69 ms | 407 KiB | 5 Q