Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php declare(strict_types=1); namespace App\Services\Bot\Telegram\Commands; use App\Se..

Decoded Output download

<?php

declare(strict_types=1);

namespace App\Services\Bot\Telegram\Commands;

use App\Services\Bot\Telegram\Callback;
use App\Services\Bot\Telegram\Message;
use Telegram\Bot\Actions;
use Telegram\Bot\Commands\Command;
use function json_encode;

/**
 * Class MenuCommand.
 */
final class MenuCommand extends Command
{
    /**
     * @var string Command Name
     */
    protected string $name = 'menu';

    /**
     * @var string Command Description
     */
    protected string $description = '[] ';

    /**
     * {@inheritdoc}
     */
    public function handle()
    {
        $update = $this->update;
        $message = $update->message;
        $chat_id = $message->chat->id;

        if ($message->chat->type === 'private') {
            // 
            //  '' 
            $this->replyWithChatAction(['action' => Actions::TYPING]);
            // 
            $send_user = [
                'id' => $message->from->id,
            ];

            $user = Message::getUser($send_user['id']);

            if ($user === null) {
                $reply = null;
            } else {
                $reply = Callback::getUserIndexKeyboard($user);
            }
            // 
            return $this->replyWithMessage(
                [
                    'text' => $reply['text'] ?? 'Hi!',
                    'parse_mode' => 'Markdown',
                    'disable_web_page_preview' => false,
                    'reply_to_message_id' => null,
                    'reply_markup' => json_encode(
                        [
                            'inline_keyboard' => $reply['keyboard'] ?? [],
                        ]
                    ),
                ]
            );
        }

        return null;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace App\Services\Bot\Telegram\Commands;

use App\Services\Bot\Telegram\Callback;
use App\Services\Bot\Telegram\Message;
use Telegram\Bot\Actions;
use Telegram\Bot\Commands\Command;
use function json_encode;

/**
 * Class MenuCommand.
 */
final class MenuCommand extends Command
{
    /**
     * @var string Command Name
     */
    protected string $name = 'menu';

    /**
     * @var string Command Description
     */
    protected string $description = '[] ';

    /**
     * {@inheritdoc}
     */
    public function handle()
    {
        $update = $this->update;
        $message = $update->message;
        $chat_id = $message->chat->id;

        if ($message->chat->type === 'private') {
            // 
            //  '' 
            $this->replyWithChatAction(['action' => Actions::TYPING]);
            // 
            $send_user = [
                'id' => $message->from->id,
            ];

            $user = Message::getUser($send_user['id']);

            if ($user === null) {
                $reply = null;
            } else {
                $reply = Callback::getUserIndexKeyboard($user);
            }
            // 
            return $this->replyWithMessage(
                [
                    'text' => $reply['text'] ?? 'Hi!',
                    'parse_mode' => 'Markdown',
                    'disable_web_page_preview' => false,
                    'reply_to_message_id' => null,
                    'reply_markup' => json_encode(
                        [
                            'inline_keyboard' => $reply['keyboard'] ?? [],
                        ]
                    ),
                ]
            );
        }

        return null;
    }
}

Function Calls

None

Variables

None

Stats

MD5 c7b3dbdbb515980e5589d5ded74c3aa0
Eval Count 0
Decode Time 132 ms