The intval Function
The intval function takes any value and always returns a number. If you pass a regular number to it, it will return it. But if you pass it a string, the function will try to extract a number from it. It can obtain a number from a string if it comes at the very beginning. If there is no number in the string, or if it does not come first, then the function will return 0:
muffin_log(intval('38 parrots')); // Outputs: "38"
muffin_log(intval('Friday the 13th')); // Outputs: "0"
The ternary operator
The ternary operator is useful when you need to choose one of two values:
condition ? value-1 : value-2.
If the condition is true, then PHP uses value -1, but if it is false, then it uses value-2. A question mark is inserted after the condition, and the values are separated by a colon.
<p class="<?= get_product_is_new($id) ? 'new' : 'old' ?>">...</p>
The ternary operator has shorthand notation:
value-1 ?: value-2
The shorthand notation works as follows: if value-1 is true, then it is used. But if it is false, then value-2 is used.
$page = intval($_GET['page']) ?: 1;
The number 0, the strings '' and '0', the boolean value false, and arrays with no elements are all considered to be false in PHP. The other numbers, strings, and arrays are considered to be true.
The for Loop
The for loop is similar to while, but its syntax is more compact, and when you use it, it is very hard to forget about the counter.
for (before the loop; condition; after the iteration) {
loop body
}
The code in parentheses has three parts, and they are separated by semicolons:
- The code that will be executed once before the loop starts. Usually, a counter variable is declared here.
- The condition that will be evaluated before each iteration of the loop. If the condition is true, the code inside the body will be executed, and if it is false, the loop will terminate.
- The code that will be executed after each iteration. This is usually where the counter variable is increased.
Just like in other loops, the body of the for loop is written inside curly braces.
for ($i = 1; $i <= 9; $i = $i + 1) {
muffin_log($i);
}
In order to insert the for loop in the template, we will use the following syntax:
- The PHP tags are written in full: <?php ?>;
- Instead of curly braces, we will write a colon: for ():;
- The end of the loop is indicated by the endfor command, which is followed by a semicolon.
<ol>
<?php for ($i = 1; $i <= 9; $i = $i + 1): ?> // Start of the loop
<li>...</li> // Body of the loop
<?php endfor; ?> // End of the loop
</ol>
The ceil Function
The ceil function accepts a number, and if it is a fraction, then it rounds it up to the nearest integer:
muffin_log(ceil(3.5)); // Outputs: "4"
muffin_log(ceil(3.99999)); // Outputs: "4"
muffin_log(ceil(3.00001)); // Outputs: "4"
PHP also has two other rounding functions: floor and round. The first rounds down, and the second rounds either up or down to the nearest integer.
muffin_log(floor(3.9)); // Outputs: "3"
muffin_log(round(3.4)); // Outputs: "3"
muffin_log(round(3.6)); // Outputs: "4"
The date Function
The date function accepts a template string, and it returns the date in the specified format.
$now = date('H:i:s d.m.Y');
The date format is specified in the template string using control characters. Here are a few of them:
CharacterValuedDay of the month, two digits with leading zerosjDay of the month with a leading zeroFFull name of the month (in English)mSequential number of the month with a leading zeropSequential number of the month without a leading zeroYSequential number of the year, four digitsyNumber of the year, two digitsHHours in the 24-hour format with a leading zeroiMinutes with a leading zerosSeconds with a leading zero
A complete list of characters can be found in the documentation.
The function returns the characters that are not control characters unchanged. Therefore, we can use spaces, dots, and the like in the template string.
By default, the date function returns the time of the time zone specified in the PHP settings on the server. The time zone can be changed from the script using the date_default_timezone_set function. You can read more details in the documentation.
Single and Double Quotes
PHP uses both single ' as well as double " quotes for strings. They work the same in most cases, though not always. For example, if you use a variable inside single quotes, then its name will be output. And if you use it inside double quotes, then the value will be:
$name = 'Dumpo';
muffin_log('The elephant is called $name'); // Outputs: "The elephant is called $name"
muffin_log("The elephant is called $name"); // Outputs: "The elephant is called Dumpo"
Double quotes can help you avoid a confusing concatenation. You can learn more about the differences between the quotation marks in the documentation.
Continue
<!DOCTYPE html><html lang="en" class="no-js"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script>var b=document.documentElement.classList;b.remove('no-js');if(!window.Promise||!window.sessionStorage||!!sessionStorage.getItem('muller.v2')){b.add('muller')}</script><link rel="dns-prefetch" href="https://assets.htmlacademy.org"><script async src="https://www.googletagmanager.com/gtag/js?id=G-MXPCRXM48C"></script><script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-MXPCRXM48C');
</script><script type="text/javascript">
(function(e,t){var n=e.amplitude||{_q:[],_iq:{}};var r=t.createElement("script")
;r.type="text/javascript"
;r.integrity="sha384-d/yhnowERvm+7eCU79T/bYjOiMmq4F11ElWYLmt0ktvYEVgqLDazh4+gW9CKMpYW"
;r.crossOrigin="anonymous";r.async=true
;r.src="https://cdn.amplitude.com/libs/amplitude-5.2.2-min.gz.js"
;r.onload=function(){if(!e.amplitude.runQueuedFunctions){
console.log("[Amplitude] Error: could not load SDK")}}
;var i=t.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i)
;function s(e,t){e.prototype[t]=function(){
this._q.push([t].concat(Array.prototype.slice.call(arguments,0)));return this}}
var o=function(){this._q=[];return this}
;var a=["add","append","clearAll","prepend","set","setOnce","unset"]
;for(var u=0;u<a.length;u++){s(o,a[u])}n.Identify=o;var c=function(){this._q=[]
;return this}
;var l=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"]
;for(var p=0;p<l.length;p++){s(c,l[p])}n.Revenue=c
;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"]
;function v(e){function t(t){e[t]=function(){
e._q.push([t].concat(Array.prototype.slice.call(arguments,0)))}}
for(var n=0;n<d.length;n++){t(d[n])}}v(n);n.getInstance=function(e){
e=(!e||e.length===0?"$default_instance":e).toLowerCase()
;if(!n._iq.hasOwnProperty(e)){n._iq[e]={_q:[]};v(n._iq[e])}return n._iq[e]}
;e.amplitude=n})(window,document);
amplitude.getInstance().init("df11525b6880a3c5e2af14f9b6238408", null,{
includeUtm: true,
includeGclid: true,
includeReferrer: true,
deviceIdFromUrlParam: true
}, function (instance) {
window.amplitudeLoaded = true;
});
</script><link rel="stylesheet" href="https://assets.htmlacademy.org/css/core.v284.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/profile.v236.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/course.v246.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/course-interface-light.v20.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/course-interface-en.v2.css"><script src="https://assets.htmlacademy.org/js/sentry.js" data-sentry="3774884cc81746ed84c0ba7c5cd4ac7b" data-project="26" data-version="2"></script><link rel="stylesheet" href="/css/custom.css"><link rel="stylesheet" href="/css/cookies.css"><link rel="preload" as="script" href="https://assets.htmlacademy.org/js/general.v274.js"><title>Summary of “Numbers and Strings in PHP” — Numbers and strings in PHP — HTML Academy</title><meta name="csrf-token" content="68064caf322823086fca37a7326b9bd2a54"><meta property="og:type" content="website"><meta property="og:site_name" content="HTML Academy"><meta name="twitter:url" property="og:url" content="https://htmlacademy.org"><meta name="twitter:title" property="og:title" content="Interactive online courses HTML Academy"><meta name="twitter:description" property="og:description" content="Together we’ll learn how to work with real code, solve true-to-life problems, use cutting edge technologies. Minimum of boring theory and lots of practical tasks."><meta name="twitter:image" property="og:image" content="https://htmlacademy.org/og/htmlacademy.png"><meta name="twitter:card" content="summary_large_image"><link rel="canonical" href="https://htmlacademy.org/courses/php-basics/php-numbers-strings/summary"><meta name="theme-color" content="#2f358f"></head><body class="course-interface course-interface--light course-interface--full" data-base="/assets/courses/34/"><header class="page-header page-header--course"><div class="page-header__inner"><div class="page-header__top"><a class="page-header__logo" href="/" aria-label="HTML Academy Home"><img src="https://assets.htmlacademy.org/img/logo--small.svg?cs=1218aec0be4a5f23db79ad29a14e30f7f9fb9a25" width="24" height="36" alt="HTML Academy"></a><nav class="main-nav main-nav--mini" role="navigation"><div class="main-nav__course-nav"><a class="main-nav__course-item main-nav__course-button main-nav__course-button--prev" href="/courses/php-basics/php-numbers-strings/use-double-quotes">Using double quotes</a><div class="main-nav__course-item main-nav__course-list main-nav__course-list--collapsed"><b class="main-nav__course-title">Numbers and strings in PHP</b><span class="main-nav__course-stat">15/15</span><div class="main-nav__course-contents"><a class="main-nav__course-contents-link" href="/courses/php-basics/php-numbers-strings">Back to the list of tasks</a><ul class="main-nav__course-contents-list"><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/pagination">1. Creating pagination in the catalog</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/offset">2. Calculating the offset</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/intval-function">3. The intval function</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/shorthand-ternary-operator">4. The shorthand ternary operator ?:</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/for-loop">5. The for loop</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/embed-loop">6. Embedding the for loop in the template</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/add-href">7. Adding an address to the href attribute</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/count-pages">8. Counting the number of catalog pages</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/ceil-function">9. The ceil function</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/ternary-operator">10. The ternary operator ?:</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/current-page-link">11. Highlighting the link to the current page</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/date-function">12. The date function</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/change-date-format">13. Changing the date format</a></li><li class="main-nav__course-contents-item"><a href="/courses/php-basics/php-numbers-strings/use-double-quotes">14. Using double quotes</a></li><li class="main-nav__course-contents-item main-nav__course-contents-item--current"><a href="/courses/php-basics/php-numbers-strings/summary">15. Summary of “Numbers and Strings in PHP”</a></li></ul></div></div><a class="main-nav__course-item main-nav__course-button main-nav__course-button--next" href="/courses/php-basics/php-numbers-strings">List of tasks</a></div><ul class="main-nav__list main-nav__list--user main-nav__list--user-guest"><li class="main-nav__item" itemprop="name"><a class="main-nav__link" href="/signup?redirect_url=%2Fcourses%2Fphp-basics%2Fphp-numbers-strings%2Fsummary" title="Sign up" data-modal="open" data-value="register" itemprop="url"><span class="main-nav__icon" aria-hidden="true"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#user"></use></svg></span>Sign up</a></li><li class="main-nav__item main-nav__item--login" itemprop="name"><a class="main-nav__link" href="/login?redirect_url=%2Fcourses%2Fphp-basics%2Fphp-numbers-strings%2Fsummary" title="Log in" data-modal="open" data-value="login" itemprop="url"><span class="main-nav__icon" aria-hidden="true"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#login"></use></svg></span>Log in</a></li></ul></nav></div></div></header><main class="course-container"><div class="course-theory"><div class="course-theory__inner"><section class="course-theory__content"><h1 class="course-theory__content-heading course-theory__content-heading--synopsis">Summary of “Numbers and Strings in PHP”</h1><div class="course-theory__content-text"><h2>The intval Function</h2><p>The <code>intval</code> function takes any value and always returns a number. If you pass a regular number to it, it will return it. But if you pass it a string, the function will try to extract a number from it. It can obtain a number from a string if it comes at the very beginning. If there is no number in the string, or if it does not come first, then the function will return <code>0</code>:</p><pre><code>muffin_log(<mark>intval</mark>('38 parrots')); // Outputs: "38"
muffin_log(<mark>intval</mark>('Friday the 13th')); // Outputs: "0"</code></pre><h2>The ternary operator</h2><p>The ternary operator is useful when you need to choose one of two values:</p><pre><code>condition <mark>?</mark> value-1 <mark>:</mark> value-2.</code></pre><p>If the condition is true, then PHP uses <code class="nowrap">value -1</code>, but if it is false, then it uses <code class="nowrap">value-2</code>. A question mark is inserted after the condition, and the values are separated by a colon.</p><pre><code><p class="<?= get_product_is_new($id) ? 'new' : 'old' ?>">...</p></code></pre><p>The ternary operator has shorthand notation:</p><pre><code>value-1 <mark>?:</mark> value-2</code></pre><p>The shorthand notation works as follows: if <code class="nowrap">value-1</code> is true, then it is used. But if it is false, then <code class="nowrap">value-2</code> is used.</p><pre><code>$page = intval($_GET['page']) ?: 1;</code></pre><p>The number <code>0</code>, the strings <code>''</code> and <code>'0'</code>, the boolean value <code>false</code>, and arrays with no elements are all considered to be false in PHP. The other numbers, strings, and arrays are considered to be true.</p><h2>The for Loop</h2><p>The <code>for</code> loop is similar to <code>while</code>, but its syntax is more compact, and when you use it, it is very hard to forget about the counter.</p><pre><code>for (before the loop; condition; after the iteration) {
loop body
}</code></pre><p>The code in parentheses has three parts, and they are separated by semicolons:</p><ul><li>The code that will be executed <b>once</b> before the loop starts. Usually, a counter variable is declared here.</li><li>The condition that will be evaluated <b>before each iteration</b> of the loop. If the condition is true, the code inside the body will be executed, and if it is false, the loop will terminate.</li><li>The code that will be executed <b>after each iteration</b>. This is usually where the counter variable is increased.</li></ul><p>Just like in other loops, the body of the <code>for</code> loop is written inside curly braces.</p><pre><code>for ($i = 1; $i <= 9; $i = $i + 1) {
muffin_log($i);
}</code></pre><p>In order to insert the <code>for</code> loop in the template, we will use the following syntax:</p><ul><li>The PHP tags are written in full: <code><?php ?></code>;</li><li>Instead of curly braces, we will write a colon: <code>for ():</code>;</li><li>The end of the loop is indicated by the <code>endfor</code> command, which is followed by a semicolon.</li></ul><pre><code><ol>
<?php <mark>for ($i = 1; $i <= 9; $i = $i + 1):</mark> ?> // Start of the loop
<li>...</li> // Body of the loop
<?php <mark>endfor;</mark> ?> // End of the loop
</ol></code></pre><h2>The ceil Function</h2><p>The <code>ceil</code> function accepts a number, and if it is a fraction, then it rounds it up to the nearest integer:</p><pre><code>muffin_log(<mark>ceil</mark>(3.5)); // Outputs: "4"
muffin_log(<mark>ceil</mark>(3.99999)); // Outputs: "4"
muffin_log(<mark>ceil</mark>(3.00001)); // Outputs: "4"</code></pre><p>PHP also has two other rounding functions: <code>floor</code> and <code>round</code>. The first rounds down, and the second rounds either up or down to the nearest integer.</p><pre><code>muffin_log(floor(3.9)); // Outputs: "3"
muffin_log(round(3.4)); // Outputs: "3"
muffin_log(round(3.6)); // Outputs: "4"</code></pre><h2>The date Function</h2><p>The <code>date</code> function accepts a template string, and it returns the date in the specified format.</p><pre><code>$now = <mark>date</mark>('H:i:s d.m.Y');</code></pre><p>The date format is specified in the template string using control characters. Here are a few of them:</p><table class="table table--bordered" style="text-align: center;"><thead><tr><th style="text-align: center;">Character</th><th style="text-align: center;">Value</th></tr></thead><tbody><tr><td>d</td><td>Day of the month, two digits with leading zeros</td></tr><tr><td>j</td><td>Day of the month with a leading zero</td></tr><tr><td>F</td><td>Full name of the month (in English)</td></tr><tr><td>m</td><td>Sequential number of the month with a leading zero</td></tr><tr><td>p</td><td>Sequential number of the month without a leading zero</td></tr><tr><td>Y</td><td>Sequential number of the year, four digits</td></tr><tr><td>y</td><td>Number of the year, two digits</td></tr><tr><td>H</td><td>Hours in the 24-hour format with a leading zero</td></tr><tr><td>i</td><td>Minutes with a leading zero</td></tr><tr><td>s</td><td>Seconds with a leading zero</td></tr></tbody></table><p>A complete list of characters can be found in the <a href="https://www.php.net/manual/en/function.date.php" target="_blank" rel="nofollow noopener">documentation</a>.</p><p>The function returns the characters that are not control characters unchanged. Therefore, we can use spaces, dots, and the like in the template string.</p><p>By default, the <code>date</code> function returns the time of the time zone specified in the PHP settings on the server. The time zone can be changed from the script using the <code class="nowrap">date_default_timezone_set</code> function. You can read more details in the <a href="https://www.php.net/manual/en/function.date-default-timezone-set.php" target="_blank" rel="nofollow noopener">documentation</a>.</p><h2>Single and Double Quotes</h2><p>PHP uses both single <code>'</code> as well as double <code>"</code> quotes for strings. They work the same in most cases, though not always. For example, if you use a variable inside single quotes, then its name will be output. And if you use it inside double quotes, then the value will be:</p><pre><code>$name = 'Dumpo';
muffin_log(<mark>'</mark>The elephant is called $name<mark>'</mark>); // Outputs: "The elephant is called $name"
muffin_log(<mark>"</mark>The elephant is called $name<mark>"</mark>); // Outputs: "The elephant is called Dumpo"</code></pre><p>Double quotes can help you avoid a confusing concatenation. You can learn more about the differences between the quotation marks in the <a href="https://www.php.net/manual/en/language.types.string.php" target="_blank" rel="nofollow noopener">documentation</a>.</p><br><a class="button button--green button--large button--wide button--icon" href="/courses/php-basics/php-numbers-strings"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#icon-check-bold"></use></svg>
Continue
</a></div></section></div></div><script
src="https://assets.htmlacademy.org/scripts/courses-spa/htmlacademy-task.v43.js"
data-assets-path="https://assets.htmlacademy.org/scripts/courses-spa/"
data-task-type="theory"
data-lang="en"
></script><script>HtmlacademyTask.setup(function(){});</script></main><footer class="page-footer page-footer--tiny"><div class="page-footer__inner"><p><a href="/docs/cookies">Cookies</a> ∙
<a href="/docs/privacy">Privacy</a> ∙
<a href="/docs/agreement">License Agreement</a> ∙
<a href="/docs/about">About</a> ∙
<a href="/contacts">Contacts</a> ∙
© HTML Academy OÜ, 2019−2026
</p><div class="page-footer__financial"><img src="https://assets.htmlacademy.org/img/visa-white.svg?cs=96e54ec8c587db9d4b1d8d328ffd87c2ebfd9555" alt="VISA" title="VISA" width="35" height="35"><img src="https://assets.htmlacademy.org/img/mastercard-horizontal.v2.svg" alt="Mastercard" title="Mastercard" width="35" height="35"></div></div></footer><div class="modal"><div class="modal__inner"><div class="modal__wrapper js-login hidden"><button class="modal__close icon-close" type="button" title="Close" data-modal="close"></button><h4 class="modal__header">Log in</h4><ul class="modal__social"><li class="modal__social-link modal__social-link--fb"><a href="/login/fb?redirect_url=%2Fcourses%2Fphp-basics%2Fphp-numbers-strings%2Fsummary" rel="nofollow" title="Log in via Facebook"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#facebook"></use></svg></a></li><li class="modal__social-link modal__social-link--google"><a href="/login/google?redirect_url=%2Fcourses%2Fphp-basics%2Fphp-numbers-strings%2Fsummary" rel="nofollow" title="Log in via Google"><svg height="30" width="30" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M457.732 216.625c2.628 14.041 4.063 28.743 4.063 44.098C461.796 380.688 381.481 466 260.204 466c-116.023 0-210-93.977-210-210s93.977-210 210-210c56.704 0 104.077 20.867 140.44 54.73l-59.204 59.197v-.135c-22.046-21.002-50-31.762-81.236-31.762-69.297 0-125.604 58.537-125.604 127.841 0 69.29 56.306 127.968 125.604 127.968 62.87 0 105.653-35.965 114.46-85.312h-114.46v-81.902h197.528z"/></svg></a></li></ul><div class="modal__or"><span>or</span></div><form class="modal__form form" action="/login?redirect_url=%2Fcourses%2Fphp-basics%2Fphp-numbers-strings%2Fsummary" autocomplete="off" method="post" data-submit="o"><input type="hidden" name="csrf_name" value="csrf69aebbc5d7652"><input type="hidden" name="csrf_value" value="ac283f9a9a6ff098b1fee24b00ab85f2"><div class="form__group"><label class="sr-only" for="login-email">Email</label><input class="field field--text field--full-width" type="email" name="email" placeholder="Email" value="" id="login-email"></div><div class="form__group"><label class="sr-only" for="login-password">Password</label><input class="field field--text field--full-width ym-disable-keys" type="password" name="password" placeholder="Password" id="login-password"></div><input class="button button--full-width" type="submit" data-submit-text="Logging in…" value="Log in"></form><p class="modal__forgot-password"><a href="/recover" data-modal="open" data-value="recover">Forgot your password?</a></p><a class="modal__bottom-link" href="/signup" data-modal="open" data-value="register">Sign up</a></div><div class="modal__wrapper js-register hidden"><button class="modal__close icon-close" type="button" title="Close" data-modal="close"></button><h4 class="modal__header">Sign up</h4><ul class="modal__social"><li class="modal__social-link modal__social-link--fb"><a href="/login/fb?redirect_url=%2Fcourses%2Fphp-basics%2Fphp-numbers-strings%2Fsummary" rel="nofollow" title="Log in via Facebook"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#facebook"></use></svg></a></li><li class="modal__social-link modal__social-link--google"><a href="/login/google?redirect_url=%2Fcourses%2Fphp-basics%2Fphp-numbers-strings%2Fsummary" rel="nofollow" title="Log in via Google"><svg height="30" width="30" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M457.732 216.625c2.628 14.041 4.063 28.743 4.063 44.098C461.796 380.688 381.481 466 260.204 466c-116.023 0-210-93.977-210-210s93.977-210 210-210c56.704 0 104.077 20.867 140.44 54.73l-59.204 59.197v-.135c-22.046-21.002-50-31.762-81.236-31.762-69.297 0-125.604 58.537-125.604 127.841 0 69.29 56.306 127.968 125.604 127.968 62.87 0 105.653-35.965 114.46-85.312h-114.46v-81.902h197.528z"/></svg></a></li></ul><div class="modal__or"><span>or</span></div><form class="modal__form form" action="/signup?redirect_url=%2Fcourses%2Fphp-basics%2Fphp-numbers-strings%2Fsummary" autocomplete="off" method="post"><input type="hidden" name="csrf_name" value="csrf69aebbc5d7652"><input type="hidden" name="csrf_value" value="ac283f9a9a6ff098b1fee24b00ab85f2"><div class="form__group"><label class="sr-only" for="email">
Email
<span class="required"><span class="sr-only">Required field</span><span class="required__star">*</span></span></label><div class="form__group-fields"><input class="field field--text field--full-width" type="email" name="email" value="" id="email" required placeholder="Email"></div></div><div class="form__group"><label class="sr-only" for="password">
Password
<span class="required"><span class="sr-only">Required field</span><span class="required__star">*</span></span></label><div class="form__group-fields"><input class="field field--text field--full-width" type="password" name="password" value="" id="password" required placeholder="Password"></div></div><div class="form__group"><label class="checkbox"><input class="checkbox__input" type="checkbox" name="agreement" value="1" required><span class="checkbox__text"><span>By signing up, you agree to our <a href="/docs/agreement" target="_blank">License Agreement</a> and <a href="/docs/privacy" target="_blank">Privacy Policy</a>.</span></span></label></div><input class="button button--full-width" type="submit" data-submit-text="Signing up…" value="Sign up"></form><a class="modal__bottom-link" href="/login?redirect_url=%2Fcourses%2Fphp-basics%2Fphp-numbers-strings%2Fsummary" data-modal="open" data-value="login">Log in</a></div><div class="modal__wrapper modal__wrapper--no-btn-bottom js-recover hidden"><button class="modal__close icon-close" type="button" title="Close" data-modal="close"></button><h4 class="modal__header">Restore access</h4><p class="modal__text-accent">Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.</p><form class="modal__form form" action="/recover" autocomplete="off" method="post" data-submit="o"><input type="hidden" name="csrf_name" value="csrf69aebbc5d7652"><input type="hidden" name="csrf_value" value="ac283f9a9a6ff098b1fee24b00ab85f2"><div class="form__group"><label class="sr-only" for="recovery-email">Email</label><input class="field field--text field--full-width" type="email" name="email" placeholder="Email" value="" id="recovery-email"></div><script src='https://www.google.com/recaptcha/api.js'></script><div class="form__group"><div class="g-recaptcha" data-sitekey="6LetCTEqAAAAANROWtPzfC7Rfg9iIRiRt2k2FPn7"></div></div><input class="button button--full-width" type="submit" data-submit-text="Sending…" value="Send"></form><p class="modal__text">Forgot to connect your email to the profile? Email us and we’ll help.</p></div></div></div><script async src="https://assets.htmlacademy.org/js/general.v274.js" data-assets="https://assets.htmlacademy.org" data-require="toggle,navigation-courses,modal,form,nav"></script></body></html>