Tonic - Open Up Your Eyes
I had a dream one night several years ago that makes this song so much more intense for me to listen to ever since.
I was backstage at an outdoor concert. The crowd was packed. The ring of the electric guitar began, and the crowd went crazy.
I approached the microphone on stage as the ring reached its peak and the rest of the band played the intro. I had thought the crowd was going crazy before, but somehow they found the energy to take it up 5 levels.
The intro was approaching the end and I grabbed the microphone, and just as I got the "ch-" sound out for the opening line, the crowd was still finding new levels to reach.
Then I woke up.
This might seem like a pretty vague description of the dream, but it's really hard for me to paint the picture with words. It was such a vivid dream, and I can remember all the feelings I experienced during it. I was nervous, but excited. I was confident. I walked up to that microphone stand so confidently, you'd think that it owed me money. It was such a wonderful feeling. The crowd's energy fed me. The band's energy fed me. I was full-on experiencing it.
If you think about it, along with the lyrics, you'll see the irony of it too.
Open up your eyes
Don't let your mind tell the story here
My mind was telling the story.
I don't know what it means for my life, at the time of the dream (over a decade ago) or for right now. Am I supposed to explore a singing career? I don't think I'm that talented of a vocalist. Also, who wants someone with a deep bass voice singing lead for a song like this?
When I listen to the song now, it brings a lot of those feelings out, and it's a fun ride.
At any rate, I thought I would log this for my own posterity, but also to let y'all in on how meaningful this is to me.
For years (more than 20) I have been doing things the long way with PHP. One of the examples of this is processing files and putting the results in an array (or object) to serve as key/value pairs.
Consider the following:
Foo: bar
Baz: biz
Here's some content...
If you wanted to match these lines in a way that you only get the Foo: bar
and Baz: biz
into a key/value pair, you would need to somehow match those values into a variable. Something like this would work:
<?php
preg_match_all('/^(.*?): (.*?)$/m', file_get_contents($filename), $matches);
But this will give you something like this: Array ( [0] => Array ( [0] => Foo: bar [1] => Baz: biz )
[1] => Array
(
[0] => Foo
[1] => Baz
)
[2] => Array
(
[0] => bar
[1] => biz
)
)
But what if you want to have the matched group [1]
be the keys, and matched group [2]
be the values? A for loop would accomplish it, as would other array-walking techniques.
It's far easier than that, though!
<?php
preg_match_all('/^(.*?): (.*?)$/m', file_get_contents($filename), $matches);
$keyvaluepairs = array_combine($matches[1], $matches[2]);
If you print_r()
that resultant variable, you'll find that it's exactly what you want:
Array
(
[Foo] => bar
[Baz] => biz
)
That's all I wanted to share. I hope it benefits you.