3v4l.org

run code in 300+ PHP versions simultaneously
<?php $int = 789; $nbytestr = '123'; $bytestr = 'ABC'; var_dump($nbytestr | $bytestr); var_dump($int | $nbytestr); var_dump($int | $bytestr);
Output for 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
string(3) "qrs" int(895) Fatal error: Uncaught TypeError: Unsupported operand types: int | string in /in/W582TN:9 Stack trace: #0 {main} thrown in /in/W582TN on line 9
Process exited with code 255.

preferences:
57.44 ms | 406 KiB | 5 Q