The 5th Annual China PHP Conference

Voting

Please answer this simple SPAM challenge: one minus zero?
(Example: nine)

The Note You're Voting On

golotyuk at gmail dot com
10 years ago
Simple POST and PRE incremnt sample:

<?php

$b
= 5;
$a = ( ( ++$b ) > 5 ); // Pre-increment test
echo (int)$a;

$b = 5;
$a = ( ( $b++ ) > 5 ); // Post-increment test
echo (int)$a;

?>

This will output 10, because of the difference in post- and pre-increment operations

<< Back to user notes page

To Top