Nếu dùng ++ với giá trị chuỗi, nó tăng giá trị ký tự cuối lên 1 và in giá trị ASCII.
Ví dụ
<!DOCTYPE html> <html> <body> <?php $values = 'John'; echo "The string modified value is=", ++$values, "
"; $values1 = "10.5"; echo "The string incremented value is=", ++$values1; ?> </body> </html>
Kết quả
The string modified value is=Joho The string incremented value is=11.5