3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | [email protected] so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Johannes Schlueter <[email protected]> | +----------------------------------------------------------------------+ */ if (PHP_SAPI != 'cli') { die("Please run this test from CLI!\n"); } ini_set('display_errors', 1); ini_set('output_buffering', 0); error_reporting(-1); if (!ini_get('safe_mode')) { set_time_limit(1); } echo "Testing float behaviour. If this script hangs or terminates with an error ". "message due to maximum execution time limit being reached, you should ". "update your PHP installation asap!\n"; echo "For more information refer to <http://bugs.php.net/53632>.\n"; $d = (double)"2.2250738585072011e-308"; echo "Your system seems to be safe.\n"; ?>
Output for 8.5.0
Deprecated: Non-canonical cast (double) is deprecated, use the (float) cast instead in /in/89rdm on line 35 Testing float behaviour. If this script hangs or terminates with an error message due to maximum execution time limit being reached, you should update your PHP installation asap! For more information refer to <http://bugs.php.net/53632>. Your system seems to be safe.
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 5.2.3 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14
Testing float behaviour. If this script hangs or terminates with an error message due to maximum execution time limit being reached, you should update your PHP installation asap! For more information refer to <http://bugs.php.net/53632>. Your system seems to be safe.
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
Please run this test from CLI!

preferences:
179.98 ms | 416 KiB | 5 Q