3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [0 => true, 1 => true, 2 => false]; echo reset($result) === true && count(array_unique($result)) === 1;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught TypeError: reset(): Argument #1 ($array) must be of type array, null given in /in/F3W1D:5 Stack trace: #0 /in/F3W1D(5): reset(NULL) #1 {main} thrown in /in/F3W1D on line 5
Process exited with code 255.
Output for 5.6.38, 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: reset() expects parameter 1 to be array, null given in /in/F3W1D on line 5

preferences:
148.27 ms | 402 KiB | 175 Q