3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(filter_var(new GMP(1), FILTER_VALIDATE_INT, [ 'options' => ['default' => 9], ]));
Output for 7.3.0 - 7.3.31, 7.3.33, 7.4.0 - 7.4.25, 8.0.0 - 8.0.12, 8.1rc1 - rc3
int(9)
Output for 8.0.13
Fatal error: Uncaught Error: Class "GMP" not found in /in/4Bl5M:2 Stack trace: #0 {main} thrown in /in/4Bl5M on line 2
Process exited with code 255.
Output for 7.3.32, 7.4.26
Fatal error: Uncaught Error: Class 'GMP' not found in /in/4Bl5M:2 Stack trace: #0 {main} thrown in /in/4Bl5M on line 2
Process exited with code 255.

preferences:
31.05 ms | 461 KiB | 5 Q