PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

putenv> <phpinfo
Last updated: Sat, 24 Mar 2007

view this page in

phpversion

(PHP 4, PHP 5)

phpversion — Získat současnou verzi PHP

Popis

string phpversion ( [string $extension] )

Vrátí řetězec obsahující verzi právě běžícího PHP parseru.

Příklad 1569. phpversion() example

// prints e.g. 'Současná verze PHP: 3.0rel-dev'
echo "Současná verze PHP: ".phpversion();

Viz také phpinfo(), phpcredits(), php_logo_guid()



add a note add a note User Contributed Notes
phpversion
pl DOT baasch AT skycube DOT net
13-Jul-2008 08:17
In a addition to phpversion,..

if you've got a system like ubuntu or some else, you get
<?php
echo phpversion(); // 5.2.4-2ubuntu5.2
?>

To fix this, use the following:
<?php
echo substr(phpversion(),0,strpos(phpversion(), '-'));
?>

putenv> <phpinfo
Last updated: Sat, 24 Mar 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites