cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: TFTP PUT in PHP

From: <simon_at_ice.org>
Date: Sat, 27 Oct 2007 15:37:53 +0200

Daniel Stenberg wrote:
> On Sat, 27 Oct 2007, simon_at_ice.org wrote:
>
>
>> I can attest using single or double quotes in curl declarations in PHP make
>> no difference.
>>
>
> So are you saying that in PHP land the following two lines are identical?
>
> curl_setopt($c, "CURLOPT_PUT", "TRUE");
>
> curl_setopt($c, CURLOPT_PUT, TRUE);
>
>
Simply: Yes.

curl_setopt($c, CURLOPT_PUT, TRUE);
==

curl_setopt($c, "CURLOPT_PUT", "TRUE");
==
curl_setopt($c, 'CURLOPT_PUT', "TRUE");
==

curl_setopt($c, CURLOPT_PUT, 'TRUE');

The only difference comes in with variables.
echo "$foo"
is NOT the same as
echo '$foo'

[The first dumps the contents of $foo, the second dumps '$foo']

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-10-27