- print_r: documentation ( source)
- str_pad: documentation ( source)
<?php
class A {
private static function b($seatNumber)
{
return str_pad(intval($seatNumber), 3, "0", STR_PAD_LEFT);
}
public function call()
{
print_r(self::b(4));
}
}
$a = new A;
$a->call();