PHP code example of cherryt / resptool

1. Go to this page and download the library: Download cherryt/resptool library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cherryt / resptool example snippets


  
  $data = [
        'name'=>"hello world"
  ];
  //json字符串输出
  eval(RespToStr::toString([
            ['if','1=1',101,'ok','$data'],
            ['if else','2<1',102,'新手机号与旧手机号一致',''],
            ['else','2<1',102,'新手机号与旧手机号一致',''],
  ]));