0

I copied and pasted a .php file and edited it. It went from:

<?php
    class Foo
    {
        const RESET = 'reset';

to

<?php
    class Foo
    {
        const RESET = 'reset';
        const USERBIKE = 'userbike';

So, it's just literally a like-for-like line using a different var name and value.

However, despite their 98% match, vim displays them differently:

enter image description here

How and why does it do this? How do I go about resolving?

Quick details

  • Framework being used here: Magento2 (PHP7)
  • Standard Vim on CentOS7
  • 1
    that is because the reset is parsed/detected as the reset() function since php functions are case insensitive – Christian Brabandt Jan 7 at 16:31
  • @ChristianBrabandt doh! Makes so much sense, now I just feel silly xD – treyBake Jan 7 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.