"Seemingly challenging" shell how to get the value of return in PHP

Source: Internet
Author: User
"Seemingly challenging" how the shell gets the value of return in PHP
Title PHP This file is to return an array

PHP Code
  
   
  
   ' 1 ',  ' b ' = ' 2 ',  ' c ' = ' public ',  ' d ' = ' ', '  e ' = = ', '; >


In the shell how to receive this array ah or there is no way

------Solution--------------------
PHP Code
[User:root time:07:23:08 path:/home/liangdong/php]$ php a.php Array ([a] + 1 [b] = 2 [c] = Public [d] = [E] = [User:root time:07:23:10 path:/home/liangdong/php]$ Cat a.php
  [User:root time:07:23:12 path:/home/liangdong/php]$ Cat b.php
  ' 1 ', ' b ' = ' 2 ', ' c ' = ' public ', ' d ' = ' ', ' e ' = = ', '; >
------Solution--------------------
The shell is not ripe, estimate your needs I will use later, studied one,

PHP Code
#!/bin/basheval ' cat php_data.txt |grep ' = ' |tr-d ', >\ ' "|xargs-i {} echo {}\;|tr" \ n "" "' Echo ${a}echo ${b}echo ${c}echo ${d}
------Solution--------------------
Cross-language data exchange requires a data structure that can be recognized by both parties,
Otherwise it doesn't make sense.

If you have a sample PHP code that is pre-compiled by Zend, or is being disturbed by a shield (you cannot say that he is not a PHP file)
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.