3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); function checkSharedKey($shared_key): bool { if (strlen($shared_key) != 32) { return false; } if (trim($shared_key) == "") { return flase; } return true; } var_dump(checkSharedKey(' '));
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.32, 8.3.0 - 8.3.33, 8.4.1 - 8.4.24, 8.5.0 - 8.5.9
Fatal error: Uncaught Error: Undefined constant "flase" in /in/pURcY:10 Stack trace: #0 /in/pURcY(16): checkSharedKey(' ...') #1 {main} thrown in /in/pURcY on line 10
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: Use of undefined constant flase - assumed 'flase' (this will throw an Error in a future version of PHP) in /in/pURcY on line 10 Fatal error: Uncaught TypeError: Return value of checkSharedKey() must be of the type bool, string returned in /in/pURcY:10 Stack trace: #0 /in/pURcY(16): checkSharedKey(' ...') #1 {main} thrown in /in/pURcY on line 10
Process exited with code 255.
Output for 7.2.0 - 7.2.33
Warning: Use of undefined constant flase - assumed 'flase' (this will throw an Error in a future version of PHP) in /in/pURcY on line 10 Fatal error: Uncaught TypeError: Return value of checkSharedKey() must be of the type boolean, string returned in /in/pURcY:10 Stack trace: #0 /in/pURcY(16): checkSharedKey(' ...') #1 {main} thrown in /in/pURcY on line 10
Process exited with code 255.
Output for 7.1.0 - 7.1.33
Notice: Use of undefined constant flase - assumed 'flase' in /in/pURcY on line 10 Fatal error: Uncaught TypeError: Return value of checkSharedKey() must be of the type boolean, string returned in /in/pURcY:10 Stack trace: #0 /in/pURcY(16): checkSharedKey(' ...') #1 {main} thrown in /in/pURcY on line 10
Process exited with code 255.

preferences:
126.24 ms | 1731 KiB | 4 Q