fork(1) download
  1. <?php
  2. $value2 = " 'time': 1376952971";
  3. $pieces3 = explode(":", $value2);
  4. $checkiftime = trim($pieces3[0], " '\t\n\r\0\x0B");
  5. if ($checkiftime == 'time')
  6. {
  7. echo "Yes!";
  8. }
  9. else
  10. {
  11. echo "Oh no!";
  12. }
  13.  
  14. echo PHP_EOL;
  15. var_dump($pieces3);
  16. var_dump($value2);
  17. var_dump($pieces3[0]);
  18.  
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Yes!
array(2) {
  [0]=>
  string(7) " 'time'"
  [1]=>
  string(11) " 1376952971"
}
string(19) " 'time': 1376952971"
string(7) " 'time'"