fork download
  1. <?php
  2.  
  3. $caracterChr = chr(27);
  4.  
  5. $caracterPrintf = sprintf('%c', 27);
  6.  
  7. var_dump($caracterChr, $caracterPrintf);
  8.  
  9. if ($caracterChr === $caracterPrintf) {
  10. echo 'São iguais';
  11. } else {
  12. echo 'São diferentes';
  13. }
Success #stdin #stdout 0.02s 23236KB
stdin
Standard input is empty
stdout
string(1) ""
string(1) ""
São iguais