3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(token_get_all ( <<<'str' <?php class TwistoPayment extends PaymentModule { } str ));
based on kk1kG
Output for 7.0.0 - 7.2.0
array(13) { [0]=> array(3) { [0]=> int(379) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(382) [1]=> string(1) " " [2]=> int(2) } [2]=> array(3) { [0]=> int(361) [1]=> string(5) "class" [2]=> int(2) } [3]=> array(3) { [0]=> int(382) [1]=> string(1) " " [2]=> int(2) } [4]=> array(3) { [0]=> int(319) [1]=> string(13) "TwistoPayment" [2]=> int(2) } [5]=> array(3) { [0]=> int(382) [1]=> string(1) " " [2]=> int(2) } [6]=> array(3) { [0]=> int(364) [1]=> string(7) "extends" [2]=> int(2) } [7]=> array(3) { [0]=> int(382) [1]=> string(1) " " [2]=> int(2) } [8]=> array(3) { [0]=> int(319) [1]=> string(13) "PaymentModule" [2]=> int(2) } [9]=> array(3) { [0]=> int(382) [1]=> string(1) " " [2]=> int(2) } [10]=> string(1) "{" [11]=> array(3) { [0]=> int(382) [1]=> string(1) " " [2]=> int(3) } [12]=> string(1) "}" }
Output for 5.6.7 - 5.6.28
array(13) { [0]=> array(3) { [0]=> int(376) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(379) [1]=> string(1) " " [2]=> int(2) } [2]=> array(3) { [0]=> int(358) [1]=> string(5) "class" [2]=> int(2) } [3]=> array(3) { [0]=> int(379) [1]=> string(1) " " [2]=> int(2) } [4]=> array(3) { [0]=> int(310) [1]=> string(13) "TwistoPayment" [2]=> int(2) } [5]=> array(3) { [0]=> int(379) [1]=> string(1) " " [2]=> int(2) } [6]=> array(3) { [0]=> int(361) [1]=> string(7) "extends" [2]=> int(2) } [7]=> array(3) { [0]=> int(379) [1]=> string(1) " " [2]=> int(2) } [8]=> array(3) { [0]=> int(310) [1]=> string(13) "PaymentModule" [2]=> int(2) } [9]=> array(3) { [0]=> int(379) [1]=> string(1) " " [2]=> int(2) } [10]=> string(1) "{" [11]=> array(3) { [0]=> int(379) [1]=> string(1) " " [2]=> int(3) } [12]=> string(1) "}" }
Output for 5.5.24 - 5.5.35
array(13) { [0]=> array(3) { [0]=> int(374) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(377) [1]=> string(1) " " [2]=> int(2) } [2]=> array(3) { [0]=> int(356) [1]=> string(5) "class" [2]=> int(2) } [3]=> array(3) { [0]=> int(377) [1]=> string(1) " " [2]=> int(2) } [4]=> array(3) { [0]=> int(308) [1]=> string(13) "TwistoPayment" [2]=> int(2) } [5]=> array(3) { [0]=> int(377) [1]=> string(1) " " [2]=> int(2) } [6]=> array(3) { [0]=> int(359) [1]=> string(7) "extends" [2]=> int(2) } [7]=> array(3) { [0]=> int(377) [1]=> string(1) " " [2]=> int(2) } [8]=> array(3) { [0]=> int(308) [1]=> string(13) "PaymentModule" [2]=> int(2) } [9]=> array(3) { [0]=> int(377) [1]=> string(1) " " [2]=> int(2) } [10]=> string(1) "{" [11]=> array(3) { [0]=> int(377) [1]=> string(1) " " [2]=> int(3) } [12]=> string(1) "}" }
Output for 5.4.0 - 5.4.45
array(13) { [0]=> array(3) { [0]=> int(372) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(375) [1]=> string(1) " " [2]=> int(2) } [2]=> array(3) { [0]=> int(354) [1]=> string(5) "class" [2]=> int(2) } [3]=> array(3) { [0]=> int(375) [1]=> string(1) " " [2]=> int(2) } [4]=> array(3) { [0]=> int(307) [1]=> string(13) "TwistoPayment" [2]=> int(2) } [5]=> array(3) { [0]=> int(375) [1]=> string(1) " " [2]=> int(2) } [6]=> array(3) { [0]=> int(357) [1]=> string(7) "extends" [2]=> int(2) } [7]=> array(3) { [0]=> int(375) [1]=> string(1) " " [2]=> int(2) } [8]=> array(3) { [0]=> int(307) [1]=> string(13) "PaymentModule" [2]=> int(2) } [9]=> array(3) { [0]=> int(375) [1]=> string(1) " " [2]=> int(2) } [10]=> string(1) "{" [11]=> array(3) { [0]=> int(375) [1]=> string(1) " " [2]=> int(3) } [12]=> string(1) "}" }
Output for 5.3.19 - 5.3.29
array(13) { [0]=> array(3) { [0]=> int(368) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(2) } [2]=> array(3) { [0]=> int(353) [1]=> string(5) "class" [2]=> int(2) } [3]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(2) } [4]=> array(3) { [0]=> int(307) [1]=> string(13) "TwistoPayment" [2]=> int(2) } [5]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(2) } [6]=> array(3) { [0]=> int(355) [1]=> string(7) "extends" [2]=> int(2) } [7]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(2) } [8]=> array(3) { [0]=> int(307) [1]=> string(13) "PaymentModule" [2]=> int(2) } [9]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(2) } [10]=> string(1) "{" [11]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(3) } [12]=> string(1) "}" }