3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testPHPLt8VsPHP8 = array( -10 => 'a', 'b', // PHP < 8: int 0; PHP 8+: -9. 'c', // PHP < 8: int 1; PHP 8+: -8. -4 => 'd', 'e', // PHP < 8: int 2; PHP 8+: -3. -9 => 'f', // Duplicate in PHP 8, not in PHP < 8. -8 => 'g', // Duplicate in PHP 8, not in PHP < 8. -3 => 'h', // Duplicate in PHP 8, not in PHP < 8. 0 => 'i', // Duplicate in PHP < 8, not in PHP 8. 1 => 'j', // Duplicate in PHP < 8, not in PHP 8. 2 => 'k', // Duplicate in PHP < 8, not in PHP 8. ); var_dump($testPHPLt8VsPHP8);

preferences:
121.97 ms | 2780 KiB | 5 Q