This file contains 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 lang="en"> | |
<head> | |
<title>Startseite</title> | |
<meta charset="UTF-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
body{display:block;margin:0;padding:0;position:absolute;width:100%;height:100%;left:0;top:0} | |
nav{margin:1rem 0} |
This file contains 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 MyObject | |
{ | |
private string $value; | |
/** | |
* @return string | |
*/ | |
public function getValue(): string | |
{ |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<bookstore> | |
<book category="cooking"> | |
<title lang="en">Everyday Italian</title> | |
<author>Giada De Laurentiis</author> | |
<year>2005</year> | |
<price>30.00</price> | |
</book> |
This file contains 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 SubSubChild { | |
public function __construct(private string $value) | |
{ | |
} | |
} | |
class OtherObject{ | |
public function __construct(private SubSubChild $subSubChild) | |
{ | |
} |
This file contains 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 | |
if(isset($_COOKIE['Token'])){ | |
session_id($_COOKIE['Token']); //sette den token als ID | |
} | |
session_start(); //Lade session | |
$userAcces = $_SESSION['userAccess'];//wenn Token valide ist, stehen in $_SESSION daten drin | |
$responseArray = []; | |
$responseArray = array_merge($responseArray,[$_SERVER['REQUEST_METHOD']]); | |
$responseArray = array_merge($responseArray,$_GET); | |
$responseArray = array_merge($responseArray,$_POST); |
This file contains 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 | |
error_reporting(E_ALL); | |
$context = stream_context_create([ | |
'http' => [ | |
'method' => 'GET', | |
'header' => "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.82 Safari/537.36\r\n" | |
] | |
]); |
This file contains 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 | |
error_reporting(E_ALL); | |
interface CartItemInterface | |
{ | |
public function getPrice(float $from = 0.1, float $to = 100.0): float; | |
} | |
class CartItem implements CartItemInterface |
This file contains 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
<IfModule mod_rewrite.c> | |
Options +FollowSymlinks -Indexes | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME) !-d | |
RewriteRule ^ index.php [L,QSA] | |
</IfModule> |
This file contains 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 | |
use PHPUnit\Framework\TestCase; | |
abstract class AbstractEntityGetterSetterTester extends TestCase | |
{ | |
protected $entity; | |
/** | |
* @dataProvider getData | |
*/ |
NewerOlder