This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Submitting checkboxes</title> | |
</head> | |
<body> | |
<h1>Submitting checkboxes</h1> | |
<form method="post" action="handle_form.php"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
class User | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Single-quoted strings | |
echo 'Welcome'; | |
echo '$3,000'; | |
echo '4 o\'clock'; | |
echo 'C:\\data'; | |
// Double-quoted strings | |
echo "C:\\data"; | |
echo "One\nTwo"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require "vendor/autoload.php"; | |
$parser = new Parsedown; | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$name = "David \"Dave\" O'Connor"; | |
header('Content-Type: application/json'); | |
echo json_encode($name); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class User | |
{ | |
public int $id; | |
public string $name; | |
public ?string $surname = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Example</title> | |
</head> | |
<body> | |
<form method="post" action="validate_email.php"> | |
<label for="email">email</label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
DocumentRoot "/www/project1" | |
ServerName site1.localhost | |
<Directory "/www/project1"> | |
Require all granted | |
AllowOverride All | |
</Directory> | |
</VirtualHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$payload = json_encode([ | |
"title" => "Updated title" | |
]); | |
$options = [ | |
"http" => [ | |
"method" => "PATCH", | |
"header" => "Content-type: application/json; charset=UTF-8\r\n" . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#[\Attribute(Attribute::TARGET_CLASS)] | |
class Route | |
{ | |
public function __construct( | |
public string $path | |
) | |
{} | |
} |