3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( array_combine(['re', 're', 're'], [1, 2]) );
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 ValueError: array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements in /in/nUQTX:4 Stack trace: #0 /in/nUQTX(4): array_combine(Array, Array) #1 {main} thrown in /in/nUQTX on line 4
Process exited with code 255.
Output for 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
Warning: array_combine(): Both parameters should have an equal number of elements in /in/nUQTX on line 4 bool(false)

preferences:
165.07 ms | 402 KiB | 212 Q