<?php
class Country {
function set_name($name) {
$this->name = $name;
}
}
$jurop = new Country;
$dutchieland = new Country;
$dutchieland->set_name('The Netherlands');
echo (int) $jurop, "\n";
echo (int) $dutchieland, "\n";
?>
output:
Object id #1
Object id #2
In PHP 5 (int) $object results in:
- "Object id #" + Object ID
- unless zend.ze1_compatibility_mode = 1