3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_posix_isatty() { assert('function_exists("posix_isatty")'); return posix_isatty(fopen('php://memory', 'w')); } var_dump( PHP_VERSION, test_posix_isatty() );
Output for 8.0.0 - 8.0.9, 8.1.0 - 8.1.9, 8.2.0 - 8.2.9, 8.3.0 - 8.3.9, 8.4.1 - 8.4.9, 8.5.0 - 8.5.3
Warning: posix_isatty(): Could not use stream of type 'MEMORY' in /in/R8N1L on line 5 string(5) "8.5.3" bool(false)
Output for 8.0.10 - 8.0.30, 8.1.10 - 8.1.34, 8.2.10 - 8.2.30, 8.3.10 - 8.3.30, 8.4.10 - 8.4.18
Warning: posix_isatty(): Could not use stream of type 'MEMORY' in /in/R8N1L on line 5 string(6) "8.4.18" bool(false)
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.10 - 7.4.33
Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/R8N1L on line 4 Warning: posix_isatty(): could not use stream of type 'MEMORY' in /in/R8N1L on line 5 string(6) "7.4.33" bool(false)
Output for 7.2.0 - 7.2.6, 7.4.0 - 7.4.9
Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/R8N1L on line 4 Warning: posix_isatty(): could not use stream of type 'MEMORY' in /in/R8N1L on line 5 string(5) "7.4.9" bool(false)
Output for 5.5.24 - 5.5.35, 5.6.10 - 5.6.28, 7.0.20, 7.1.10 - 7.1.20, 7.3.32 - 7.3.33
Warning: posix_isatty(): could not use stream of type 'MEMORY' in /in/R8N1L on line 5 string(6) "7.3.33" bool(false)
Output for 5.6.8 - 5.6.9, 7.0.0 - 7.0.6, 7.1.0 - 7.1.7
Warning: posix_isatty(): could not use stream of type 'MEMORY' in /in/R8N1L on line 5 string(5) "7.1.7" bool(false)

preferences:
97.14 ms | 1520 KiB | 4 Q