fork(1) download
  1. <?php
  2. $string = 'quotedStr="Hello=world"';
  3. $mess = explode(",", $string);
  4. for ($i = 0; $i < count($mess); $i++) {
  5. $mess1 = explode("=", $mess[$i]);
  6. if (is_float($mess1[1])) {
  7. $mess1[1] = (double) $mess1[1];
  8. }
  9. if (is_string($mess1[1])) {
  10. $mess1[1] = (string) $mess1[1];
  11. }
  12. if (is_numeric($mess1[1])) {
  13. $mess1[1] = (int) $mess1[1];
  14. }
  15. $k[$mess1[0]] = $mess1[1];
  16. }
Success #stdin #stdout 0.01s 24400KB
stdin
Standard input is empty
stdout
array(1) {
  ["quotedStr"]=>
  string(6) ""Hello"
}