PHP 8.0.3 Released!

System program execution

add a note add a note

User Contributed Notes 2 notes

bishop at php dot net
1 year ago
Similar to these functions, there is also the backtick ("back-tick") execution operator:
= `ls -al`;

This operator runs the command given inside the backticks, and supports string interpolation just like double quotes:

= addcslashes(sys_get_tmp_dir(), '"');      
    echo `
ls "{$dir}"`;     
1 year ago
Backticks is probably going to be deprecated. It's safer to not use it.
See details why:
To Top