PHP code example of delights / extended-tokens

1. Go to this page and download the library: Download delights/extended-tokens 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/ */

    

delights / extended-tokens example snippets


[
    T_TOKENTYPE,
    "value",
    42 // offset
];

use Delight\ExtendedTokens\ExtendedTokens;

$parser = new ExtendedTokens();
$tokens = $parser->parse('code');

namespace A\B\C;

class A {}

new A;

function hello() {}

const E = 'F';

$a = 1;

$c = 'a' . 'b';


$a->b;

function world(string $name): World {}

true && false;

function (int &$index) {}

!true;