W3docs

Get max_execution_time in PHP script

You can use the ini_get() function in PHP to get the value of max_execution_time.

You can use the ini_get() function in PHP to get the value of max_execution_time.

Example:

Example of using ini_get() function in PHP to get the value of max_execution_time

<?php

$max_execution_time = ini_get('max_execution_time');
echo "Max execution time is set to $max_execution_time seconds";

<div class="alert alert-info flex not-prose"> Watch a course <span class="hidden md:block">Watch a video course </span> Learn object oriented PHP</div>

This will output the maximum execution time, in seconds, that is currently set for the PHP script.