Strange PHP syntax
Posted
by Joseph
on Stack Overflow
See other posts from Stack Overflow
or by Joseph
Published on 2010-05-07T13:31:36Z
Indexed on
2010/05/07
13:48 UTC
Read the original article
Hit count: 198
php
I've been working on php for some time but today when I saw this it came as new to me:
if(preg_match('/foo.*bar/','foo is a bar')):
echo 'success ';
echo 'foo comes before bar';
endif;
To my surprise it also runs without error. Can anyone enlighten me?
© Stack Overflow or respective owner