3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_GET['str1'] = ["a"]; $_GET['str2'] = ["b"]; echo hash("sha256", $_GET['str1']);
Output for 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
Fatal error: Uncaught TypeError: hash(): Argument #2 ($data) must be of type string, array given in /in/gZiq4:4 Stack trace: #0 /in/gZiq4(4): hash('sha256', Array) #1 {main} thrown in /in/gZiq4 on line 4
Process exited with code 255.

preferences:
45.22 ms | 406 KiB | 5 Q