Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

BugHunters's avatar

how to know the laravel php base?

Any command to check if laravel is running on php 5 or php 7? Thanks

I am newbie

0 likes
4 replies
shakti's avatar

just create a php file and write phpinfo(); it will inform you about your php server

AhimbisibweRoland's avatar

php has a constant called

PHP_VERSION

or a mthod

phpversion()

. Any of them will always show you what version you are using

ohffs's avatar

There's also version_compare() if you need to do something, e.g. :

if (version_compare(phpversion(), '7.0.0', '>=')) {
    require 'iknow/iknow/mysql_shim.php';
}
1 like

Please or to participate in this conversation.