3v4l.org

run code in 500+ 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.34, 8.2.0 - 8.2.31, 8.3.0 - 8.3.31, 8.4.1 - 8.4.22, 8.5.0 - 8.5.7
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:
74.4 ms | 1034 KiB | 4 Q