3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = ['a' => 'test1', 'b' => 'test2', 'c' => 'test3']; $feature = true; $featureValue = $array['d']; if ($feature && isset($featureValue)) { echo "Okay, logic works!"; } else { echo "NOPE! Logic does not work!"; }
Output for 8.1.32 - 8.1.34, 8.2.0 - 8.2.34, 8.3.0 - 8.3.35, 8.4.1 - 8.4.26, 8.5.0 - 8.5.11
Warning: Undefined array key "d" in /in/VVoce on line 5 NOPE! Logic does not work!

preferences:
31.57 ms | 1496 KiB | 7 Q