Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions PHP/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# PHP

## Commenting-Out

- Confirmed working PHP 8.0.13 and 8.1.0-RC6 (Ubuntu)

## Stretched String

- Confirmed working PHP 8.0.13 and 8.1.0-RC6 (Ubuntu)

## Invisible Functions

- Confirmed working PHP 8.0.13 and 8.1.0-RC6 (Ubuntu)

## Homoglyph Function

- Confirmed working PHP 8.0.13 and 8.1.0-RC6 (Ubuntu)
6 changes: 6 additions & 0 deletions PHP/commenting-out.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env php
<?php
$isAdmin = false;
/*‮ } ⁦if ($isAdmin)⁩ ⁦ begin admins only */
echo "You are an admin.";
/* end admins only ‮ { ⁦*/
12 changes: 12 additions & 0 deletions PHP/homoglyph-function.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env php
<?php

function sayHello() {
echo "Hello, World!\n";
}

function sayНello() {
echo "Goodbye, World!\n";
}

sayНello();
16 changes: 16 additions & 0 deletions PHP/invisible-function.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env php
<?php

function isAdmin() {
return false;
}

function is​Admin() {
return true;
}

if (is​Admin()) {
echo "You are an admin\n";
} else {
echo "You are NOT an admin.\n";
}
6 changes: 6 additions & 0 deletions PHP/stretched-string.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env php
<?php
$accessLevel = "user";
if ($accessLevel != "user‮ ⁦// Check if admin⁩ ⁦") {
echo "You are an admin.";
}