Skip to content

Commit 810fa33

Browse files
committed
php: echo is more appropriate since no parsing of response content (yet!)
1 parent e3aef7b commit 810fa33

11 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎src/targets/php/curl.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ module.exports = function (source, options) {
106106
}
107107

108108
code.push('} else {')
109-
code.push(opts.indent + 'print_r($response);')
109+
code.push(opts.indent + 'echo $response;')
110110
code.push('}')
111111

112112
if (opts.closingTag) {

‎test/fixtures/output/php/curl/application-form-encoded.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
if ($err) {
2525
echo "cURL Error #:" . $err;
2626
} else {
27-
print_r($response);
27+
echo $response;
2828
}

‎test/fixtures/output/php/curl/application-json.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
if ($err) {
2525
echo "cURL Error #:" . $err;
2626
} else {
27-
print_r($response);
27+
echo $response;
2828
}

‎test/fixtures/output/php/curl/cookies.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
if ($err) {
2222
echo "cURL Error #:" . $err;
2323
} else {
24-
print_r($response);
24+
echo $response;
2525
}

‎test/fixtures/output/php/curl/full.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
if ($err) {
2727
echo "cURL Error #:" . $err;
2828
} else {
29-
print_r($response);
29+
echo $response;
3030
}

‎test/fixtures/output/php/curl/headers.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
if ($err) {
2525
echo "cURL Error #:" . $err;
2626
} else {
27-
print_r($response);
27+
echo $response;
2828
}

‎test/fixtures/output/php/curl/multipart-data.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
if ($err) {
2525
echo "cURL Error #:" . $err;
2626
} else {
27-
print_r($response);
27+
echo $response;
2828
}

‎test/fixtures/output/php/curl/multipart-file.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
if ($err) {
2525
echo "cURL Error #:" . $err;
2626
} else {
27-
print_r($response);
27+
echo $response;
2828
}

‎test/fixtures/output/php/curl/multipart-form-data.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
if ($err) {
2525
echo "cURL Error #:" . $err;
2626
} else {
27-
print_r($response);
27+
echo $response;
2828
}

‎test/fixtures/output/php/curl/query.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
if ($err) {
2121
echo "cURL Error #:" . $err;
2222
} else {
23-
print_r($response);
23+
echo $response;
2424
}

0 commit comments

Comments
 (0)