<?php
 
function code($code) {

$x=strlen($code);

if ($x == 4) {
              echo "true";
        } else if ($x==6) {
              echo "true";
        } else {
              echo "false"
     }
}

echo (code(1234)); \\result-true
echo (code(a4b56r)); \\result-true
echo (code(t674rhedbt8w39); \\result-false
by Gvanca Gharibashvili
2 years ago
PHP
Object Oriented PHP Tutorial
0
Pro tip: use ```triple backticks around text``` to write in code fences