3v4l.org

run code in 500+ PHP versions simultaneously
<?php // what does 1 and true mean here? $keys = array_keys($array, 1, true); // yes but of course $keys = array_keys($array, filter_value:1, strict:true); ?>
Output for 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.21, 8.5.0 - 8.5.6
Warning: Undefined variable $array in /in/Qr4tP on line 4 Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /in/Qr4tP:4 Stack trace: #0 /in/Qr4tP(4): array_keys(NULL, 1, true) #1 {main} thrown in /in/Qr4tP on line 4
Process exited with code 255.

preferences:
37.34 ms | 874 KiB | 4 Q