Jump to content

what does echo $variable1 || $variable2 mean?


pogidude
 Share

Recommended Posts

Just like the title says, what does this mean?

// Copy the admin.php template over the old one
echo wire('config')->paths->siteModules . 'ProcessAdminCustomPages/admin.php' . '||' . wire('config')->paths->templates . 'admin.php';
//exit;
copy ( wire('config')->paths->siteModules . 'ProcessAdminCustomPages/admin.php', wire('config')->paths->templates . 'admin.php');

got this from ProcessAdminCustomPages module. I understand the copy() part. I'm not sure what the echo part is for.

Link to comment
Share on other sites

I am sure that it is a line of debug code that diogo was using to check those paths. Note the: //exit on the next line. If you uncomment that, then the echo line will show the from and to paths which are about to be copied.

In other words, that line does nothing and the || are just his means of separating the two paths - nothing to do with the PHP "OR" operator.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...