- var_dump: documentation ( source)
- phpversion: documentation ( source)
- version_compare: documentation ( source)
<?php
$installedPhpVersion = phpversion();
var_dump(version_compare($installedPhpVersion, '5.4.1', '>='));
var_dump(version_compare($installedPhpVersion, '5.4.0', '<'));
$limit = 1000;
$objects = new SplObjectStorage;
for($i = 0; $i < $limit; $i++){
$object = new StdClass;
if(isset($objects[$object])){
die("this should never happen, but did after $i iteration");
}
$objects[$object] = 1;
}
echo 'ok';
?>