Ghh - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of Ghh.php
- <?php
- function paywall_check_user_roles(){
- $roles = ['subscriber', 'administrator', 'editor', 'author', 'contributor'];
- $allowed_roles = ['subscriber', 'administrator', 'editor', 'author', 'contributor'];
- $is_user_logged_in = false;
- if($is_user_logged_in){
- if(!empty(array_intersect($allowed_roles, $roles))){
- return true;
- }
- else {
- return false;
- }
- }
- else {
- return false;
- }
- }
- print(paywall_check_user_roles());
File Description
- Ghh
- PHP Code
- 29 Nov-2022
- 493 Bytes
You can Share it:
Latest PHP Pastes