3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'https://open-api.tiktok.com/video/list/'; $data = '{ "access_token": "'.$tik_token.'", "open_id": "'.$tik_open_tk.'", "cursor": 0, "max_count": 1, "fields": ["embed_html", "embed_link", "share_count"] }'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //curl_setopt($ch, CURLOPT_HTTPHEADER, $additional_headers); $server_output = curl_exec ($ch); echo $server_output;
Output for 8.0.1 - 8.0.22, 8.1.0 - 8.1.9
Warning: Undefined variable $tik_token in /in/NXign on line 6 Warning: Undefined variable $tik_open_tk in /in/NXign on line 7 Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/NXign:13 Stack trace: #0 {main} thrown in /in/NXign on line 13
Process exited with code 255.
Output for 7.4.0 - 7.4.30
Notice: Undefined variable: tik_token in /in/NXign on line 6 Notice: Undefined variable: tik_open_tk in /in/NXign on line 7 Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/NXign:13 Stack trace: #0 {main} thrown in /in/NXign on line 13
Process exited with code 255.

preferences:
16.82 ms | 410 KiB | 5 Q