Exécuter
❯
Exécuter le code
Ctrl+Alt+R
Changer d'orientation
Ctrl+Alt+O
Changer de thème
Ctrl+Alt+D
<!DOCTYPE html> <html> <body> <?php $str1 = "Bonjour"; $str2 = "Bonjour le monde !"; printf("[%s]<br>",$str1); // String printf("[%8s]<br>",$str1); // Right-justifies the string with spaces printf("[%-8s]<br>",$str1); // Left-justifies the string value with spaces printf("[%08s]<br>",$str1); // Zero-padding printf("[%'*8s]<br>",$str1); // Adds "*" printf("[%8.8s]<br>",$str2); // Left-justifies the string with spaces (cuts off characters after the specified value) ?> </body> </html>