3v4l.org

run code in 500+ PHP versions simultaneously
<?php // 接口配置 $apiKey = "c7b9a2de14b386f7a7dde163f2ecac98"; $domain = "aizhan.com"; // 拼接完整 URL $url = "https://apistore.aizhan.com/icp/checkdomain/{$apiKey}?domain=" . urlencode($domain); // 使用 file_get_contents 发起 GET 请求 $options = [ 'http' => [ 'method' => 'GET', 'header' => "User-Agent: Mozilla/5.0\r\n", 'timeout' => 30 ], 'ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false ] ]; $context = stream_context_create($options); $result = file_get_contents($url, false, $context); // 检查请求是否成功 if ($result === false) { echo "请求失败,请检查网络或 URL 是否正确。\n"; echo "尝试访问的 URL: " . $url . "\n"; } else { // 解析并格式化输出 JSON $data = json_decode($result, true); if ($data) { echo "=== 解析后的结果 ===\n"; echo "状态: " . $data['status'] . "\n"; echo "返回码: " . $data['code'] . "\n"; echo "消息: " . $data['msg'] . "\n"; if (isset($data['data'])) { echo "域名: " . $data['data']['domain'] . "\n"; echo "黑名单等级: " . $data['data']['blackListLevel'] . " "; switch ($data['data']['blackListLevel']) { case 2: echo "(正常域名)\n"; break; case 0: echo "(已列入黑名单)\n"; break; case -1: echo "(状态未知)\n"; break; default: echo "\n"; } } echo "\n=== 原始 JSON ===\n"; echo $result; } else { echo "原始返回内容:\n" . $result; } } ?><?php // 接口配置 $apiKey = "c7b9a2de14b386f7a7dde163f2ecac98"; $domain = "aizhan.com"; // 拼接完整 URL $url = "https://apistore.aizhan.com/icp/checkdomain/{$apiKey}?domain=" . urlencode($domain); // 使用 file_get_contents 发起 GET 请求 $options = [ 'http' => [ 'method' => 'GET', 'header' => "User-Agent: Mozilla/5.0\r\n", 'timeout' => 30 ], 'ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false ] ]; $context = stream_context_create($options); $result = file_get_contents($url, false, $context); // 检查请求是否成功 if ($result === false) { echo "请求失败,请检查网络或 URL 是否正确。\n"; echo "尝试访问的 URL: " . $url . "\n"; } else { // 解析并格式化输出 JSON $data = json_decode($result, true); if ($data) { echo "=== 解析后的结果 ===\n"; echo "状态: " . $data['status'] . "\n"; echo "返回码: " . $data['code'] . "\n"; echo "消息: " . $data['msg'] . "\n"; if (isset($data['data'])) { echo "域名: " . $data['data']['domain'] . "\n"; echo "黑名单等级: " . $data['data']['blackListLevel'] . " "; switch ($data['data']['blackListLevel']) { case 2: echo "(正常域名)\n"; break; case 0: echo "(已列入黑名单)\n"; break; case -1: echo "(状态未知)\n"; break; default: echo "\n"; } } echo "\n=== 原始 JSON ===\n"; echo $result; } else { echo "原始返回内容:\n" . $result; } } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.30.0320.00816.55
8.5.20.0330.00716.57
8.5.10.0370.00416.56
8.5.00.0330.00616.78
8.4.180.0310.01119.64
8.4.170.0370.00619.73
8.4.160.0310.00719.72
8.4.150.0340.01119.73
8.4.140.0300.01017.66
8.4.130.0370.01017.63
8.4.120.0230.00517.91
8.4.110.0270.00417.50
8.4.100.0250.00917.99
8.4.90.0180.01017.95
8.4.80.0410.00617.93
8.4.70.0450.00917.64
8.4.60.0310.01017.96
8.4.50.0410.00517.69
8.4.40.0410.01117.83
8.4.30.0390.00917.86
8.4.20.0300.01117.71
8.4.10.0180.00417.80
8.3.300.0110.00718.23
8.3.290.0180.00618.46
8.3.280.0170.00618.35
8.3.270.0230.00216.92
8.3.260.0240.00716.66
8.3.250.0290.00817.03
8.3.240.0330.00716.80
8.3.230.0320.01216.70
8.3.220.0370.00616.79
8.3.210.0430.00716.82
8.3.200.0340.00816.69
8.3.190.0360.00816.66
8.3.180.0330.00916.93
8.3.170.0210.00716.79
8.3.160.0170.00416.86
8.3.150.0180.00316.86
8.3.140.0180.00416.82
8.3.130.0240.00816.58
8.3.120.0130.00516.61
8.3.110.0180.00316.59
8.3.100.0200.00516.62
8.3.90.0190.00516.77
8.3.80.0130.00716.78
8.3.70.0180.00316.90
8.3.60.0170.00616.80
8.3.50.0200.00116.88
8.3.40.0350.00717.75
8.3.30.0230.00817.80
8.3.20.0240.00617.93
8.3.10.0180.00517.97
8.3.00.0200.00317.93

preferences:
43.81 ms | 778 KiB | 5 Q