3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_GET['str1'] = ["a"]; $_GET['str2'] = ["b"]; $salt = "aaabdnelnFnekknfn"; if($_GET['str1'] !== $_GET['str2'] and $_GET['str1'] and $_GET['str2']) { $hash1 = hash('sha256', $salt . $_GET['str1']); $hash2 = hash('sha256', $salt . $_GET['str2']); if($hash1 === $hash2) { var_dump($_GET['str1'],$_GET['str2']); } }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.14, 8.4.1
Warning: Array to string conversion in /in/SPYKb on line 8 Warning: Array to string conversion in /in/SPYKb on line 9 array(1) { [0]=> string(1) "a" } array(1) { [0]=> string(1) "b" }
Output for 5.4.0 - 5.4.39, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Notice: Array to string conversion in /in/SPYKb on line 8 Notice: Array to string conversion in /in/SPYKb on line 9 array(1) { [0]=> string(1) "a" } array(1) { [0]=> string(1) "b" }
Output for 4.4.2, 5.2.16
Parse error: syntax error, unexpected '[' in /in/SPYKb on line 2
Process exited with code 255.
Output for 4.3.0
Parse error: parse error, unexpected '[' in /in/SPYKb on line 2
Process exited with code 255.

preferences:
52.75 ms | 409 KiB | 5 Q