- Code: Select all
<?php
$str = array("Foo", "Bar");
echo "Name: {$str[($str[1]) ? 1 : 0]}"; // Should echo "Name: Bar"
?>
The text "($str[1" appears highlighted as a syntax error (?) and the square brackets on either side are (using colour scheme "Blackboard") highlighted in yellow text. The matchBrackets algorithm successfully finds the correct brackets though.