Source for file ext.php

Documentation is available at ext.php

  1. <?
  2.  
  3. /* Finds the first empty "slot" in an array */
  4. function empty_slot ($arr)
  5. {
  6. $c=-1;
  7. foreach ($arr as $num => $val)
  8. {
  9. if (is_numeric($num)) ++$c;
  10. if (($num!=$c)) return $c;
  11. }
  12. return ++$c;
  13. }
  14.  
  15. function class_conv($obj,$to)
  16. {
  17. $objname=get_class($obj);
  18. $temp=serialize($obj);
  19. $temp=ereg_replace('O:'.strlen($objname).':"'.$objname.'":',
  20. 'O:'.strlen($to ).':"'.$to .'":',$temp);
  21. return unserialize($temp);
  22. }

Documentation generated on Tue, 24 May 2005 03:57:48 -0400 by phpDocumentor 1.3.0RC3