You are here: How to determine installed PHP Version? « All PHP « IT news, forums, messages
How to determine installed PHP Version?

Posted by rustysmith on 09/18/06 23:58

Anyone know how to sniff out the PHP version that a current file is
running on? This would be helpful in the instance where you are trying
to make a package that can be distributed publicly for use in a variety
of configurations. This code should(?) work:

$ver=PHP_VERSION;
if(ereg('^[1-4]',$ver))
$post_ids=array_flip(&$post_ids); // Old syntax
else
$post_ids=array_flip($post_ids); // PHP 5+ syntax

but it still throws the error:

Warning: Call-time pass-by-reference has been deprecated - argument
passed by value; If you would like to pass it by reference, modify the
declaration of array_flip(). If you would like to enable call-time
pass-by-reference, you can set allow_call_time_pass_reference to true
in your INI file. However, future versions may not support this any
longer.

When executed in PHP 5.+

Thanks in advance for any ideas how to make this work?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация