xiaozi 2015-01-06 20:30:53

php中,`++$a` 和 `$a = $a + 1` 是一样的吗?

<?php

$a = '1d9';
echo ++$a . PHP_EOL; // 1e0

$b = '1d9';
$b = $b + 1;
echo $b . PHP_EOL; // 2

评论

ホーム - Wiki
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-15 00:44
浙ICP备14020137号-1 $お客様$