PHP Doku:: MOD - internals2.opcodes.mod.html

Verlauf / Chronik / History: (2) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchPHP im Kern: Das Entwicklerhandbuch für die Zend EngineZend Engine 2 opcode listOpcodesMOD

Ein Service von Reinhard Neidl - Webprogrammierung.

Opcodes

<<JMPZ_EX

MUL>>

MOD

PHP code

<?php
/*
 * Makes the value of "result" congruent to "value1" modulo "value2".
 * opcode number: 5
 */
echo 3;
?>

PHP opcodes

Function name: (null)

Compiled variables: none

line#op fetchextreturn operands
60 MOD   ~0 6,3
 1 ECHO     ~0
72 RETURN     1

Ein BenutzerBeitrag:
- Beiträge aktualisieren...
shaunny at hotmail dot com
8.01.2010 15:35
A simple check to see if a number is divisible by another number,
i.e. if a number is even.

<?php
if ($counter % 2) {
echo
"This number is not even.";
} else {
echo
"This number is even.";
}
?>



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)