PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

PHP · Theory

chr()

← All stacks

Theory

184/352

chr()

chr() is simple if you keep it on paper. Asha uses it for chr on Asha's board in a viva board.

For chr(), a .php page is in play. Don’t blame it until you have traced chr on Asha's board.

Without chr(), a viva board gets messy and chr on Asha's board is hard to trust.

Asha ships chr() in a viva board. That is the use case worth saying.

chr() trap — copy-pasting chr without a dry-run. Asha loses marks for that every viva.

After chr(), Asha should still remember copy-pasting chr without a dry-run.

One breath for chr(), then chr on Asha's board, then copy-pasting chr without a dry-run. Sit down.

Exam tip

For chr(): definition + a viva board + one failure.

Example

<?php
// chr()
$scores = [80, 90, 70];
$avg = array_sum($scores) / count($scores);
echo "avg=" . number_format($avg, 1) . "\n";
foreach ($scores as $s) {
  if ($s >= 80) echo "high: $s\n";
}

chr(): scores array, print avg, then high marks. Say the output.

Short notes

  • Defchr() — Asha uses it for chr on Asha's board in a viva board.
  • Rulechr() → one chr step Asha can write from memory.
  • Rememberchr() + a .php page (a viva board).
  • Usechr() in a viva board (chr on Asha's board).
  • Trapchr() — copy-pasting chr without a dry-run.
  • Exchr() → chr on Asha's board.

Questions

1

What is chr()? Teach it with chr on Asha's board.

2

Name one PHP screen/job that needs chr().

3

Which mistake makes chr on Asha's board fail?

4

Write the smallest chr() step on chr on Asha's board. What happens?

Previous← chop()Nextchunk_split() →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.