3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $code = '<?php function extractURL($url) { if (preg_match(\'#http://www.bing.com/?$#i\', $url, $match)) { return $match[1]; } return null; } '; $tokens = token_get_all($code); print_r($tokens); foreach ($tokens as $token) { if (is_string($token)) { print "[(string token)] " . $token . "\r\n"; } elseif ($token[0] === T_WHITESPACE) { print "[T_WHITESPACE]\r\n"; } else { print "[" . token_name($token[0]) . "] " . trim($token[1]) . "\r\n"; } }
Output for 7.0.0 - 7.1.0
Array ( [0] => Array ( [0] => 379 [1] => <?php [2] => 1 ) [1] => Array ( [0] => 346 [1] => function [2] => 2 ) [2] => Array ( [0] => 382 [1] => [2] => 2 ) [3] => Array ( [0] => 319 [1] => extractURL [2] => 2 ) [4] => ( [5] => Array ( [0] => 320 [1] => $url [2] => 2 ) [6] => ) [7] => Array ( [0] => 382 [1] => [2] => 2 ) [8] => { [9] => Array ( [0] => 382 [1] => [2] => 3 ) [10] => Array ( [0] => 327 [1] => if [2] => 4 ) [11] => Array ( [0] => 382 [1] => [2] => 4 ) [12] => ( [13] => Array ( [0] => 319 [1] => preg_match [2] => 4 ) [14] => ( [15] => Array ( [0] => 323 [1] => '#http://www.bing.com/?$#i' [2] => 4 ) [16] => , [17] => Array ( [0] => 382 [1] => [2] => 4 ) [18] => Array ( [0] => 320 [1] => $url [2] => 4 ) [19] => , [20] => Array ( [0] => 382 [1] => [2] => 4 ) [21] => Array ( [0] => 320 [1] => $match [2] => 4 ) [22] => ) [23] => ) [24] => Array ( [0] => 382 [1] => [2] => 4 ) [25] => { [26] => Array ( [0] => 382 [1] => [2] => 4 ) [27] => Array ( [0] => 348 [1] => return [2] => 5 ) [28] => Array ( [0] => 382 [1] => [2] => 5 ) [29] => Array ( [0] => 320 [1] => $match [2] => 5 ) [30] => [ [31] => Array ( [0] => 317 [1] => 1 [2] => 5 ) [32] => ] [33] => ; [34] => Array ( [0] => 382 [1] => [2] => 5 ) [35] => } [36] => Array ( [0] => 382 [1] => [2] => 6 ) [37] => Array ( [0] => 348 [1] => return [2] => 7 ) [38] => Array ( [0] => 382 [1] => [2] => 7 ) [39] => Array ( [0] => 319 [1] => null [2] => 7 ) [40] => ; [41] => Array ( [0] => 382 [1] => [2] => 7 ) [42] => } [43] => Array ( [0] => 382 [1] => [2] => 8 ) ) [T_OPEN_TAG] <?php [T_FUNCTION] function [T_WHITESPACE] [T_STRING] extractURL [(string token)] ( [T_VARIABLE] $url [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_IF] if [T_WHITESPACE] [(string token)] ( [T_STRING] preg_match [(string token)] ( [T_CONSTANT_ENCAPSED_STRING] '#http://www.bing.com/?$#i' [(string token)] , [T_WHITESPACE] [T_VARIABLE] $url [(string token)] , [T_WHITESPACE] [T_VARIABLE] $match [(string token)] ) [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_VARIABLE] $match [(string token)] [ [T_LNUMBER] 1 [(string token)] ] [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_STRING] null [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE]
Output for 5.3.0 - 5.3.29, hhvm-3.10.0 - 3.12.0
Array ( [0] => Array ( [0] => 368 [1] => <?php [2] => 1 ) [1] => Array ( [0] => 334 [1] => function [2] => 2 ) [2] => Array ( [0] => 371 [1] => [2] => 2 ) [3] => Array ( [0] => 307 [1] => extractURL [2] => 2 ) [4] => ( [5] => Array ( [0] => 309 [1] => $url [2] => 2 ) [6] => ) [7] => Array ( [0] => 371 [1] => [2] => 2 ) [8] => { [9] => Array ( [0] => 371 [1] => [2] => 3 ) [10] => Array ( [0] => 301 [1] => if [2] => 4 ) [11] => Array ( [0] => 371 [1] => [2] => 4 ) [12] => ( [13] => Array ( [0] => 307 [1] => preg_match [2] => 4 ) [14] => ( [15] => Array ( [0] => 315 [1] => '#http://www.bing.com/?$#i' [2] => 4 ) [16] => , [17] => Array ( [0] => 371 [1] => [2] => 4 ) [18] => Array ( [0] => 309 [1] => $url [2] => 4 ) [19] => , [20] => Array ( [0] => 371 [1] => [2] => 4 ) [21] => Array ( [0] => 309 [1] => $match [2] => 4 ) [22] => ) [23] => ) [24] => Array ( [0] => 371 [1] => [2] => 4 ) [25] => { [26] => Array ( [0] => 371 [1] => [2] => 4 ) [27] => Array ( [0] => 336 [1] => return [2] => 5 ) [28] => Array ( [0] => 371 [1] => [2] => 5 ) [29] => Array ( [0] => 309 [1] => $match [2] => 5 ) [30] => [ [31] => Array ( [0] => 305 [1] => 1 [2] => 5 ) [32] => ] [33] => ; [34] => Array ( [0] => 371 [1] => [2] => 5 ) [35] => } [36] => Array ( [0] => 371 [1] => [2] => 6 ) [37] => Array ( [0] => 336 [1] => return [2] => 7 ) [38] => Array ( [0] => 371 [1] => [2] => 7 ) [39] => Array ( [0] => 307 [1] => null [2] => 7 ) [40] => ; [41] => Array ( [0] => 371 [1] => [2] => 7 ) [42] => } [43] => Array ( [0] => 371 [1] => [2] => 8 ) ) [T_OPEN_TAG] <?php [T_FUNCTION] function [T_WHITESPACE] [T_STRING] extractURL [(string token)] ( [T_VARIABLE] $url [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_IF] if [T_WHITESPACE] [(string token)] ( [T_STRING] preg_match [(string token)] ( [T_CONSTANT_ENCAPSED_STRING] '#http://www.bing.com/?$#i' [(string token)] , [T_WHITESPACE] [T_VARIABLE] $url [(string token)] , [T_WHITESPACE] [T_VARIABLE] $match [(string token)] ) [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_VARIABLE] $match [(string token)] [ [T_LNUMBER] 1 [(string token)] ] [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_STRING] null [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE]
Output for 5.6.8 - 5.6.28
Array ( [0] => Array ( [0] => 376 [1] => <?php [2] => 1 ) [1] => Array ( [0] => 337 [1] => function [2] => 2 ) [2] => Array ( [0] => 379 [1] => [2] => 2 ) [3] => Array ( [0] => 310 [1] => extractURL [2] => 2 ) [4] => ( [5] => Array ( [0] => 312 [1] => $url [2] => 2 ) [6] => ) [7] => Array ( [0] => 379 [1] => [2] => 2 ) [8] => { [9] => Array ( [0] => 379 [1] => [2] => 3 ) [10] => Array ( [0] => 304 [1] => if [2] => 4 ) [11] => Array ( [0] => 379 [1] => [2] => 4 ) [12] => ( [13] => Array ( [0] => 310 [1] => preg_match [2] => 4 ) [14] => ( [15] => Array ( [0] => 318 [1] => '#http://www.bing.com/?$#i' [2] => 4 ) [16] => , [17] => Array ( [0] => 379 [1] => [2] => 4 ) [18] => Array ( [0] => 312 [1] => $url [2] => 4 ) [19] => , [20] => Array ( [0] => 379 [1] => [2] => 4 ) [21] => Array ( [0] => 312 [1] => $match [2] => 4 ) [22] => ) [23] => ) [24] => Array ( [0] => 379 [1] => [2] => 4 ) [25] => { [26] => Array ( [0] => 379 [1] => [2] => 4 ) [27] => Array ( [0] => 339 [1] => return [2] => 5 ) [28] => Array ( [0] => 379 [1] => [2] => 5 ) [29] => Array ( [0] => 312 [1] => $match [2] => 5 ) [30] => [ [31] => Array ( [0] => 308 [1] => 1 [2] => 5 ) [32] => ] [33] => ; [34] => Array ( [0] => 379 [1] => [2] => 5 ) [35] => } [36] => Array ( [0] => 379 [1] => [2] => 6 ) [37] => Array ( [0] => 339 [1] => return [2] => 7 ) [38] => Array ( [0] => 379 [1] => [2] => 7 ) [39] => Array ( [0] => 310 [1] => null [2] => 7 ) [40] => ; [41] => Array ( [0] => 379 [1] => [2] => 7 ) [42] => } [43] => Array ( [0] => 379 [1] => [2] => 8 ) ) [T_OPEN_TAG] <?php [T_FUNCTION] function [T_WHITESPACE] [T_STRING] extractURL [(string token)] ( [T_VARIABLE] $url [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_IF] if [T_WHITESPACE] [(string token)] ( [T_STRING] preg_match [(string token)] ( [T_CONSTANT_ENCAPSED_STRING] '#http://www.bing.com/?$#i' [(string token)] , [T_WHITESPACE] [T_VARIABLE] $url [(string token)] , [T_WHITESPACE] [T_VARIABLE] $match [(string token)] ) [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_VARIABLE] $match [(string token)] [ [T_LNUMBER] 1 [(string token)] ] [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_STRING] null [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE]
Output for 5.5.24 - 5.5.35
Array ( [0] => Array ( [0] => 374 [1] => <?php [2] => 1 ) [1] => Array ( [0] => 335 [1] => function [2] => 2 ) [2] => Array ( [0] => 377 [1] => [2] => 2 ) [3] => Array ( [0] => 308 [1] => extractURL [2] => 2 ) [4] => ( [5] => Array ( [0] => 310 [1] => $url [2] => 2 ) [6] => ) [7] => Array ( [0] => 377 [1] => [2] => 2 ) [8] => { [9] => Array ( [0] => 377 [1] => [2] => 3 ) [10] => Array ( [0] => 302 [1] => if [2] => 4 ) [11] => Array ( [0] => 377 [1] => [2] => 4 ) [12] => ( [13] => Array ( [0] => 308 [1] => preg_match [2] => 4 ) [14] => ( [15] => Array ( [0] => 316 [1] => '#http://www.bing.com/?$#i' [2] => 4 ) [16] => , [17] => Array ( [0] => 377 [1] => [2] => 4 ) [18] => Array ( [0] => 310 [1] => $url [2] => 4 ) [19] => , [20] => Array ( [0] => 377 [1] => [2] => 4 ) [21] => Array ( [0] => 310 [1] => $match [2] => 4 ) [22] => ) [23] => ) [24] => Array ( [0] => 377 [1] => [2] => 4 ) [25] => { [26] => Array ( [0] => 377 [1] => [2] => 4 ) [27] => Array ( [0] => 337 [1] => return [2] => 5 ) [28] => Array ( [0] => 377 [1] => [2] => 5 ) [29] => Array ( [0] => 310 [1] => $match [2] => 5 ) [30] => [ [31] => Array ( [0] => 306 [1] => 1 [2] => 5 ) [32] => ] [33] => ; [34] => Array ( [0] => 377 [1] => [2] => 5 ) [35] => } [36] => Array ( [0] => 377 [1] => [2] => 6 ) [37] => Array ( [0] => 337 [1] => return [2] => 7 ) [38] => Array ( [0] => 377 [1] => [2] => 7 ) [39] => Array ( [0] => 308 [1] => null [2] => 7 ) [40] => ; [41] => Array ( [0] => 377 [1] => [2] => 7 ) [42] => } [43] => Array ( [0] => 377 [1] => [2] => 8 ) ) [T_OPEN_TAG] <?php [T_FUNCTION] function [T_WHITESPACE] [T_STRING] extractURL [(string token)] ( [T_VARIABLE] $url [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_IF] if [T_WHITESPACE] [(string token)] ( [T_STRING] preg_match [(string token)] ( [T_CONSTANT_ENCAPSED_STRING] '#http://www.bing.com/?$#i' [(string token)] , [T_WHITESPACE] [T_VARIABLE] $url [(string token)] , [T_WHITESPACE] [T_VARIABLE] $match [(string token)] ) [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_VARIABLE] $match [(string token)] [ [T_LNUMBER] 1 [(string token)] ] [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_STRING] null [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE]
Output for 5.4.0 - 5.4.45
Array ( [0] => Array ( [0] => 372 [1] => <?php [2] => 1 ) [1] => Array ( [0] => 334 [1] => function [2] => 2 ) [2] => Array ( [0] => 375 [1] => [2] => 2 ) [3] => Array ( [0] => 307 [1] => extractURL [2] => 2 ) [4] => ( [5] => Array ( [0] => 309 [1] => $url [2] => 2 ) [6] => ) [7] => Array ( [0] => 375 [1] => [2] => 2 ) [8] => { [9] => Array ( [0] => 375 [1] => [2] => 3 ) [10] => Array ( [0] => 301 [1] => if [2] => 4 ) [11] => Array ( [0] => 375 [1] => [2] => 4 ) [12] => ( [13] => Array ( [0] => 307 [1] => preg_match [2] => 4 ) [14] => ( [15] => Array ( [0] => 315 [1] => '#http://www.bing.com/?$#i' [2] => 4 ) [16] => , [17] => Array ( [0] => 375 [1] => [2] => 4 ) [18] => Array ( [0] => 309 [1] => $url [2] => 4 ) [19] => , [20] => Array ( [0] => 375 [1] => [2] => 4 ) [21] => Array ( [0] => 309 [1] => $match [2] => 4 ) [22] => ) [23] => ) [24] => Array ( [0] => 375 [1] => [2] => 4 ) [25] => { [26] => Array ( [0] => 375 [1] => [2] => 4 ) [27] => Array ( [0] => 336 [1] => return [2] => 5 ) [28] => Array ( [0] => 375 [1] => [2] => 5 ) [29] => Array ( [0] => 309 [1] => $match [2] => 5 ) [30] => [ [31] => Array ( [0] => 305 [1] => 1 [2] => 5 ) [32] => ] [33] => ; [34] => Array ( [0] => 375 [1] => [2] => 5 ) [35] => } [36] => Array ( [0] => 375 [1] => [2] => 6 ) [37] => Array ( [0] => 336 [1] => return [2] => 7 ) [38] => Array ( [0] => 375 [1] => [2] => 7 ) [39] => Array ( [0] => 307 [1] => null [2] => 7 ) [40] => ; [41] => Array ( [0] => 375 [1] => [2] => 7 ) [42] => } [43] => Array ( [0] => 375 [1] => [2] => 8 ) ) [T_OPEN_TAG] <?php [T_FUNCTION] function [T_WHITESPACE] [T_STRING] extractURL [(string token)] ( [T_VARIABLE] $url [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_IF] if [T_WHITESPACE] [(string token)] ( [T_STRING] preg_match [(string token)] ( [T_CONSTANT_ENCAPSED_STRING] '#http://www.bing.com/?$#i' [(string token)] , [T_WHITESPACE] [T_VARIABLE] $url [(string token)] , [T_WHITESPACE] [T_VARIABLE] $match [(string token)] ) [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_VARIABLE] $match [(string token)] [ [T_LNUMBER] 1 [(string token)] ] [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_STRING] null [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE]
Output for 5.2.2 - 5.2.17
Array ( [0] => Array ( [0] => 367 [1] => <?php [2] => 1 ) [1] => Array ( [0] => 333 [1] => function [2] => 2 ) [2] => Array ( [0] => 370 [1] => [2] => 2 ) [3] => Array ( [0] => 307 [1] => extractURL [2] => 2 ) [4] => ( [5] => Array ( [0] => 309 [1] => $url [2] => 2 ) [6] => ) [7] => Array ( [0] => 370 [1] => [2] => 2 ) [8] => { [9] => Array ( [0] => 370 [1] => [2] => 3 ) [10] => Array ( [0] => 301 [1] => if [2] => 4 ) [11] => Array ( [0] => 370 [1] => [2] => 4 ) [12] => ( [13] => Array ( [0] => 307 [1] => preg_match [2] => 4 ) [14] => ( [15] => Array ( [0] => 315 [1] => '#http://www.bing.com/?$#i' [2] => 4 ) [16] => , [17] => Array ( [0] => 370 [1] => [2] => 4 ) [18] => Array ( [0] => 309 [1] => $url [2] => 4 ) [19] => , [20] => Array ( [0] => 370 [1] => [2] => 4 ) [21] => Array ( [0] => 309 [1] => $match [2] => 4 ) [22] => ) [23] => ) [24] => Array ( [0] => 370 [1] => [2] => 4 ) [25] => { [26] => Array ( [0] => 370 [1] => [2] => 4 ) [27] => Array ( [0] => 335 [1] => return [2] => 5 ) [28] => Array ( [0] => 370 [1] => [2] => 5 ) [29] => Array ( [0] => 309 [1] => $match [2] => 5 ) [30] => [ [31] => Array ( [0] => 305 [1] => 1 [2] => 5 ) [32] => ] [33] => ; [34] => Array ( [0] => 370 [1] => [2] => 5 ) [35] => } [36] => Array ( [0] => 370 [1] => [2] => 6 ) [37] => Array ( [0] => 335 [1] => return [2] => 7 ) [38] => Array ( [0] => 370 [1] => [2] => 7 ) [39] => Array ( [0] => 307 [1] => null [2] => 7 ) [40] => ; [41] => Array ( [0] => 370 [1] => [2] => 7 ) [42] => } [43] => Array ( [0] => 370 [1] => [2] => 8 ) ) [T_OPEN_TAG] <?php [T_FUNCTION] function [T_WHITESPACE] [T_STRING] extractURL [(string token)] ( [T_VARIABLE] $url [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_IF] if [T_WHITESPACE] [(string token)] ( [T_STRING] preg_match [(string token)] ( [T_CONSTANT_ENCAPSED_STRING] '#http://www.bing.com/?$#i' [(string token)] , [T_WHITESPACE] [T_VARIABLE] $url [(string token)] , [T_WHITESPACE] [T_VARIABLE] $match [(string token)] ) [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_VARIABLE] $match [(string token)] [ [T_LNUMBER] 1 [(string token)] ] [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_STRING] null [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE]
Output for 5.1.0 - 5.2.1
Array ( [0] => Array ( [0] => 367 [1] => <?php ) [1] => Array ( [0] => 333 [1] => function ) [2] => Array ( [0] => 370 [1] => ) [3] => Array ( [0] => 307 [1] => extractURL ) [4] => ( [5] => Array ( [0] => 309 [1] => $url ) [6] => ) [7] => Array ( [0] => 370 [1] => ) [8] => { [9] => Array ( [0] => 370 [1] => ) [10] => Array ( [0] => 301 [1] => if ) [11] => Array ( [0] => 370 [1] => ) [12] => ( [13] => Array ( [0] => 307 [1] => preg_match ) [14] => ( [15] => Array ( [0] => 315 [1] => '#http://www.bing.com/?$#i' ) [16] => , [17] => Array ( [0] => 370 [1] => ) [18] => Array ( [0] => 309 [1] => $url ) [19] => , [20] => Array ( [0] => 370 [1] => ) [21] => Array ( [0] => 309 [1] => $match ) [22] => ) [23] => ) [24] => Array ( [0] => 370 [1] => ) [25] => { [26] => Array ( [0] => 370 [1] => ) [27] => Array ( [0] => 335 [1] => return ) [28] => Array ( [0] => 370 [1] => ) [29] => Array ( [0] => 309 [1] => $match ) [30] => [ [31] => Array ( [0] => 305 [1] => 1 ) [32] => ] [33] => ; [34] => Array ( [0] => 370 [1] => ) [35] => } [36] => Array ( [0] => 370 [1] => ) [37] => Array ( [0] => 335 [1] => return ) [38] => Array ( [0] => 370 [1] => ) [39] => Array ( [0] => 307 [1] => null ) [40] => ; [41] => Array ( [0] => 370 [1] => ) [42] => } [43] => Array ( [0] => 370 [1] => ) ) [T_OPEN_TAG] <?php [T_FUNCTION] function [T_WHITESPACE] [T_STRING] extractURL [(string token)] ( [T_VARIABLE] $url [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_IF] if [T_WHITESPACE] [(string token)] ( [T_STRING] preg_match [(string token)] ( [T_CONSTANT_ENCAPSED_STRING] '#http://www.bing.com/?$#i' [(string token)] , [T_WHITESPACE] [T_VARIABLE] $url [(string token)] , [T_WHITESPACE] [T_VARIABLE] $match [(string token)] ) [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_VARIABLE] $match [(string token)] [ [T_LNUMBER] 1 [(string token)] ] [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_STRING] null [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE]
Output for 5.0.0 - 5.0.5
Array ( [0] => Array ( [0] => 365 [1] => <?php ) [1] => Array ( [0] => 332 [1] => function ) [2] => Array ( [0] => 368 [1] => ) [3] => Array ( [0] => 306 [1] => extractURL ) [4] => ( [5] => Array ( [0] => 308 [1] => $url ) [6] => ) [7] => Array ( [0] => 368 [1] => ) [8] => { [9] => Array ( [0] => 368 [1] => ) [10] => Array ( [0] => 300 [1] => if ) [11] => Array ( [0] => 368 [1] => ) [12] => ( [13] => Array ( [0] => 306 [1] => preg_match ) [14] => ( [15] => Array ( [0] => 314 [1] => '#http://www.bing.com/?$#i' ) [16] => , [17] => Array ( [0] => 368 [1] => ) [18] => Array ( [0] => 308 [1] => $url ) [19] => , [20] => Array ( [0] => 368 [1] => ) [21] => Array ( [0] => 308 [1] => $match ) [22] => ) [23] => ) [24] => Array ( [0] => 368 [1] => ) [25] => { [26] => Array ( [0] => 368 [1] => ) [27] => Array ( [0] => 334 [1] => return ) [28] => Array ( [0] => 368 [1] => ) [29] => Array ( [0] => 308 [1] => $match ) [30] => [ [31] => Array ( [0] => 304 [1] => 1 ) [32] => ] [33] => ; [34] => Array ( [0] => 368 [1] => ) [35] => } [36] => Array ( [0] => 368 [1] => ) [37] => Array ( [0] => 334 [1] => return ) [38] => Array ( [0] => 368 [1] => ) [39] => Array ( [0] => 306 [1] => null ) [40] => ; [41] => Array ( [0] => 368 [1] => ) [42] => } [43] => Array ( [0] => 368 [1] => ) ) [T_OPEN_TAG] <?php [T_FUNCTION] function [T_WHITESPACE] [T_STRING] extractURL [(string token)] ( [T_VARIABLE] $url [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_IF] if [T_WHITESPACE] [(string token)] ( [T_STRING] preg_match [(string token)] ( [T_CONSTANT_ENCAPSED_STRING] '#http://www.bing.com/?$#i' [(string token)] , [T_WHITESPACE] [T_VARIABLE] $url [(string token)] , [T_WHITESPACE] [T_VARIABLE] $match [(string token)] ) [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_VARIABLE] $match [(string token)] [ [T_LNUMBER] 1 [(string token)] ] [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_STRING] null [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE]
Output for 4.4.2 - 4.4.9
Array ( [0] => Array ( [0] => 354 [1] => <?php ) [1] => Array ( [0] => 332 [1] => function ) [2] => Array ( [0] => 357 [1] => ) [3] => Array ( [0] => 305 [1] => extractURL ) [4] => ( [5] => Array ( [0] => 307 [1] => $url ) [6] => ) [7] => Array ( [0] => 357 [1] => ) [8] => { [9] => Array ( [0] => 357 [1] => ) [10] => Array ( [0] => 299 [1] => if ) [11] => Array ( [0] => 357 [1] => ) [12] => ( [13] => Array ( [0] => 305 [1] => preg_match ) [14] => ( [15] => Array ( [0] => 313 [1] => '#http://www.bing.com/?$#i' ) [16] => , [17] => Array ( [0] => 357 [1] => ) [18] => Array ( [0] => 307 [1] => $url ) [19] => , [20] => Array ( [0] => 357 [1] => ) [21] => Array ( [0] => 307 [1] => $match ) [22] => ) [23] => ) [24] => Array ( [0] => 357 [1] => ) [25] => { [26] => Array ( [0] => 357 [1] => ) [27] => Array ( [0] => 334 [1] => return ) [28] => Array ( [0] => 357 [1] => ) [29] => Array ( [0] => 307 [1] => $match ) [30] => [ [31] => Array ( [0] => 303 [1] => 1 ) [32] => ] [33] => ; [34] => Array ( [0] => 357 [1] => ) [35] => } [36] => Array ( [0] => 357 [1] => ) [37] => Array ( [0] => 334 [1] => return ) [38] => Array ( [0] => 357 [1] => ) [39] => Array ( [0] => 305 [1] => null ) [40] => ; [41] => Array ( [0] => 357 [1] => ) [42] => } [43] => Array ( [0] => 357 [1] => ) ) [T_OPEN_TAG] <?php [T_FUNCTION] function [T_WHITESPACE] [T_STRING] extractURL [(string token)] ( [T_VARIABLE] $url [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_IF] if [T_WHITESPACE] [(string token)] ( [T_STRING] preg_match [(string token)] ( [T_CONSTANT_ENCAPSED_STRING] '#http://www.bing.com/?$#i' [(string token)] , [T_WHITESPACE] [T_VARIABLE] $url [(string token)] , [T_WHITESPACE] [T_VARIABLE] $match [(string token)] ) [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_VARIABLE] $match [(string token)] [ [T_LNUMBER] 1 [(string token)] ] [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_STRING] null [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE]
Output for 4.3.0 - 4.4.1
Array ( [0] => Array ( [0] => 353 [1] => <?php ) [1] => Array ( [0] => 331 [1] => function ) [2] => Array ( [0] => 356 [1] => ) [3] => Array ( [0] => 304 [1] => extractURL ) [4] => ( [5] => Array ( [0] => 306 [1] => $url ) [6] => ) [7] => Array ( [0] => 356 [1] => ) [8] => { [9] => Array ( [0] => 356 [1] => ) [10] => Array ( [0] => 298 [1] => if ) [11] => Array ( [0] => 356 [1] => ) [12] => ( [13] => Array ( [0] => 304 [1] => preg_match ) [14] => ( [15] => Array ( [0] => 312 [1] => '#http://www.bing.com/?$#i' ) [16] => , [17] => Array ( [0] => 356 [1] => ) [18] => Array ( [0] => 306 [1] => $url ) [19] => , [20] => Array ( [0] => 356 [1] => ) [21] => Array ( [0] => 306 [1] => $match ) [22] => ) [23] => ) [24] => Array ( [0] => 356 [1] => ) [25] => { [26] => Array ( [0] => 356 [1] => ) [27] => Array ( [0] => 333 [1] => return ) [28] => Array ( [0] => 356 [1] => ) [29] => Array ( [0] => 306 [1] => $match ) [30] => [ [31] => Array ( [0] => 302 [1] => 1 ) [32] => ] [33] => ; [34] => Array ( [0] => 356 [1] => ) [35] => } [36] => Array ( [0] => 356 [1] => ) [37] => Array ( [0] => 333 [1] => return ) [38] => Array ( [0] => 356 [1] => ) [39] => Array ( [0] => 304 [1] => null ) [40] => ; [41] => Array ( [0] => 356 [1] => ) [42] => } [43] => Array ( [0] => 356 [1] => ) ) [T_OPEN_TAG] <?php [T_FUNCTION] function [T_WHITESPACE] [T_STRING] extractURL [(string token)] ( [T_VARIABLE] $url [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_IF] if [T_WHITESPACE] [(string token)] ( [T_STRING] preg_match [(string token)] ( [T_CONSTANT_ENCAPSED_STRING] '#http://www.bing.com/?$#i' [(string token)] , [T_WHITESPACE] [T_VARIABLE] $url [(string token)] , [T_WHITESPACE] [T_VARIABLE] $match [(string token)] ) [(string token)] ) [T_WHITESPACE] [(string token)] { [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_VARIABLE] $match [(string token)] [ [T_LNUMBER] 1 [(string token)] ] [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE] [T_RETURN] return [T_WHITESPACE] [T_STRING] null [(string token)] ; [T_WHITESPACE] [(string token)] } [T_WHITESPACE]