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.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
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:
65.1 ms | 996 KiB | 4 Q