Home > Backend Development > PHP Tutorial > php-初学PHP,想请教。。。

php-初学PHP,想请教。。。

WBOY
Release: 2016-06-02 11:32:07
Original
916 people have browsed it

php

$s=$s+1与++$s应该是等同的吧,为何以下两段代码的结果不一样呢?

代码一:

$s='a';
++$s;
echo $s;

代码二:

$s='a';
$s=$s+1;
echo $s;

Related labels:
php
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