File tree Expand file tree Collapse file tree
rules-tests/Php85/Rector/ShellExec/ShellExecFunctionCallOverBackticksRector/Fixture Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Rector \Tests \Php85 \Rector \ShellExec \ShellExecFunctionCallOverBackticksRector \Fixture ;
4+
5+ class WithVariable
6+ {
7+ public function run ()
8+ {
9+ $ dir = __DIR__ ;
10+ $ var = 'example ' ;
11+
12+ $ output = `ls -al `;
13+ $ output2 = `ls $ dir `;
14+ $ output3 = `echo "value: $ var" `;
15+ echo "<pre> $ output</pre> " ;
16+ echo "<pre> $ output2</pre> " ;
17+ echo "<pre> $ output3</pre> " ;
18+ }
19+ }
20+
21+ ?>
22+ -----
23+ <?php
24+
25+ namespace Rector \Tests \Php85 \Rector \ShellExec \ShellExecFunctionCallOverBackticksRector \Fixture ;
26+
27+ class WithVariable
28+ {
29+ public function run ()
30+ {
31+ $ dir = __DIR__ ;
32+ $ var = 'example ' ;
33+
34+ $ output = shell_exec ("ls -al " );
35+ $ output2 = shell_exec ("ls $ dir " );
36+ $ output3 = shell_exec ("echo \"value: $ var \"" );
37+ echo "<pre> $ output</pre> " ;
38+ echo "<pre> $ output2</pre> " ;
39+ echo "<pre> $ output3</pre> " ;
40+ }
41+ }
42+
43+ ?>
You can’t perform that action at this time.
0 commit comments