Get max_execution_time in PHP script

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

Example:

<?php

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

Watch a course Learn object oriented PHP

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