3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mapping = new \stdclass(); echo $mapping->type ?? $mapping['type'];
Output for 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /in/NEdul:5 Stack trace: #0 {main} thrown in /in/NEdul on line 5
Process exited with code 255.

preferences:
24.79 ms | 406 KiB | 5 Q