3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = null; switch ($value) { case 'apple': echo "Apple"; break; case 'banana': echo "Banana"; break; case 'cherry': echo "Cherry"; break; }
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.24, 8.2.0 - 8.2.11

preferences:
25.02 ms | 405 KiB | 5 Q