Single quotes in php (conversion between int type and string type)

WBOY
Release: 2016-07-29 08:57:51
Original
1116 people have browsed it

Sample code:

<code><span>$a</span> = <span>'10'</span>;
var_dump(gettype(<span>$a</span>));
settype(<span>$a</span>,<span>'int'</span>);
var_dump(gettype(<span>$a</span>));</code>
Copy after login

The output results at this time are: string, interger

But if:

<code><span>$a</span> = <span>10</span>;
var_dump(gettype(<span>$a</span>));
settype(<span>$a</span>,<span>'int'</span>);
var_dump(gettype(<span>$a</span>));</code>
Copy after login

The output results at this time are all single quotes in interger

php! ! !

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the single quotes in PHP (conversion between int type and string type), including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template