3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myIntegerOrComplexObject = new stdClass(); switch( $myIntegerOrComplexObject ) { case 1: echo "blub"; break; case 2: echo "bla"; break; default: echo "This is probably an object or a int other than 1 & 2"; }
Output for 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Notice: Object of class stdClass could not be converted to int in /in/V9kXr on line 6 blub

preferences:
41.3 ms | 704 KiB | 4 Q