PHP code example of tioffs / fentities

1. Go to this page and download the library: Download tioffs/fentities library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tioffs / fentities example snippets


$message  = [
                "_" => "message",
                "out" => false,
                "mentioned" => false,
                "media_unread" => false,
                "silent" => true,
                "post" => true,
                "from_scheduled" => false,
                "legacy" => false,
                "id" => 83943,
                "to_id" => [
                    "_" => "peerChannel",
                    "channel_id" => 123456789
                ],
                "date" => 1565361063,
                "message" => "PHP is a popular general-purpose scripting language that is especially suited to web development. http://php.net",
                "media" => [],
                "entities" => [
                    [
                        "_" => "messageEntityBold",
                        "offset" => 0,
                        "length" => 96
                    ],
                    [
                        "_" => "messageEntityUrl",
                        "offset" => 98,
                        "length" => 14
                    ]
                ],
                "views" => 34566
            ];

html
<b>PHP is a popular general-purpose scripting language that
is especially suited to web development.</b>
<a href="http://php.net">http://php.net</a>