3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tokens = token_get_all("<?php $str = 'begin'.'en'.'eind'; ?>"); var_dump($tokens);
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: str in /in/P2pZo on line 2 array(12) { [0]=> array(3) { [0]=> int(379) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(382) [1]=> string(1) " " [2]=> int(1) } [2]=> string(1) "=" [3]=> array(3) { [0]=> int(382) [1]=> string(1) " " [2]=> int(1) } [4]=> array(3) { [0]=> int(323) [1]=> string(7) "'begin'" [2]=> int(1) } [5]=> string(1) "." [6]=> array(3) { [0]=> int(323) [1]=> string(4) "'en'" [2]=> int(1) } [7]=> string(1) "." [8]=> array(3) { [0]=> int(323) [1]=> string(6) "'eind'" [2]=> int(1) } [9]=> string(1) ";" [10]=> array(3) { [0]=> int(382) [1]=> string(1) " " [2]=> int(1) } [11]=> array(3) { [0]=> int(381) [1]=> string(2) "?>" [2]=> int(1) } }
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: str in /in/P2pZo on line 2 array(12) { [0]=> array(3) { [0]=> int(368) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(1) } [2]=> string(1) "=" [3]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(1) } [4]=> array(3) { [0]=> int(315) [1]=> string(7) "'begin'" [2]=> int(1) } [5]=> string(1) "." [6]=> array(3) { [0]=> int(315) [1]=> string(4) "'en'" [2]=> int(1) } [7]=> string(1) "." [8]=> array(3) { [0]=> int(315) [1]=> string(6) "'eind'" [2]=> int(1) } [9]=> string(1) ";" [10]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(1) } [11]=> array(3) { [0]=> int(370) [1]=> string(2) "?>" [2]=> int(1) } }
Output for 5.6.0 - 5.6.28
Notice: Undefined variable: str in /in/P2pZo on line 2 array(12) { [0]=> array(3) { [0]=> int(376) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(379) [1]=> string(1) " " [2]=> int(1) } [2]=> string(1) "=" [3]=> array(3) { [0]=> int(379) [1]=> string(1) " " [2]=> int(1) } [4]=> array(3) { [0]=> int(318) [1]=> string(7) "'begin'" [2]=> int(1) } [5]=> string(1) "." [6]=> array(3) { [0]=> int(318) [1]=> string(4) "'en'" [2]=> int(1) } [7]=> string(1) "." [8]=> array(3) { [0]=> int(318) [1]=> string(6) "'eind'" [2]=> int(1) } [9]=> string(1) ";" [10]=> array(3) { [0]=> int(379) [1]=> string(1) " " [2]=> int(1) } [11]=> array(3) { [0]=> int(378) [1]=> string(2) "?>" [2]=> int(1) } }
Output for 5.5.0 - 5.5.35
Notice: Undefined variable: str in /in/P2pZo on line 2 array(12) { [0]=> array(3) { [0]=> int(374) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(377) [1]=> string(1) " " [2]=> int(1) } [2]=> string(1) "=" [3]=> array(3) { [0]=> int(377) [1]=> string(1) " " [2]=> int(1) } [4]=> array(3) { [0]=> int(316) [1]=> string(7) "'begin'" [2]=> int(1) } [5]=> string(1) "." [6]=> array(3) { [0]=> int(316) [1]=> string(4) "'en'" [2]=> int(1) } [7]=> string(1) "." [8]=> array(3) { [0]=> int(316) [1]=> string(6) "'eind'" [2]=> int(1) } [9]=> string(1) ";" [10]=> array(3) { [0]=> int(377) [1]=> string(1) " " [2]=> int(1) } [11]=> array(3) { [0]=> int(376) [1]=> string(2) "?>" [2]=> int(1) } }
Output for 5.4.0 - 5.4.45
array(12) { [0]=> array(3) { [0]=> int(372) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(375) [1]=> string(1) " " [2]=> int(1) } [2]=> string(1) "=" [3]=> array(3) { [0]=> int(375) [1]=> string(1) " " [2]=> int(1) } [4]=> array(3) { [0]=> int(315) [1]=> string(7) "'begin'" [2]=> int(1) } [5]=> string(1) "." [6]=> array(3) { [0]=> int(315) [1]=> string(4) "'en'" [2]=> int(1) } [7]=> string(1) "." [8]=> array(3) { [0]=> int(315) [1]=> string(6) "'eind'" [2]=> int(1) } [9]=> string(1) ";" [10]=> array(3) { [0]=> int(375) [1]=> string(1) " " [2]=> int(1) } [11]=> array(3) { [0]=> int(374) [1]=> string(2) "?>" [2]=> int(1) } }
Output for 5.3.0 - 5.3.29
array(12) { [0]=> array(3) { [0]=> int(368) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(1) } [2]=> string(1) "=" [3]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(1) } [4]=> array(3) { [0]=> int(315) [1]=> string(7) "'begin'" [2]=> int(1) } [5]=> string(1) "." [6]=> array(3) { [0]=> int(315) [1]=> string(4) "'en'" [2]=> int(1) } [7]=> string(1) "." [8]=> array(3) { [0]=> int(315) [1]=> string(6) "'eind'" [2]=> int(1) } [9]=> string(1) ";" [10]=> array(3) { [0]=> int(371) [1]=> string(1) " " [2]=> int(1) } [11]=> array(3) { [0]=> int(370) [1]=> string(2) "?>" [2]=> int(1) } }
Output for 5.2.2 - 5.2.17
array(12) { [0]=> array(3) { [0]=> int(367) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(370) [1]=> string(1) " " [2]=> int(1) } [2]=> string(1) "=" [3]=> array(3) { [0]=> int(370) [1]=> string(1) " " [2]=> int(1) } [4]=> array(3) { [0]=> int(315) [1]=> string(7) "'begin'" [2]=> int(1) } [5]=> string(1) "." [6]=> array(3) { [0]=> int(315) [1]=> string(4) "'en'" [2]=> int(1) } [7]=> string(1) "." [8]=> array(3) { [0]=> int(315) [1]=> string(6) "'eind'" [2]=> int(1) } [9]=> string(1) ";" [10]=> array(3) { [0]=> int(370) [1]=> string(1) " " [2]=> int(1) } [11]=> array(3) { [0]=> int(369) [1]=> string(2) "?>" [2]=> int(1) } }
Output for 5.1.0 - 5.2.1
array(12) { [0]=> array(2) { [0]=> int(367) [1]=> string(6) "<?php " } [1]=> array(2) { [0]=> int(370) [1]=> string(1) " " } [2]=> string(1) "=" [3]=> array(2) { [0]=> int(370) [1]=> string(1) " " } [4]=> array(2) { [0]=> int(315) [1]=> string(7) "'begin'" } [5]=> string(1) "." [6]=> array(2) { [0]=> int(315) [1]=> string(4) "'en'" } [7]=> string(1) "." [8]=> array(2) { [0]=> int(315) [1]=> string(6) "'eind'" } [9]=> string(1) ";" [10]=> array(2) { [0]=> int(370) [1]=> string(1) " " } [11]=> array(2) { [0]=> int(369) [1]=> string(2) "?>" } }
Output for 5.0.0 - 5.0.5
array(12) { [0]=> array(2) { [0]=> int(365) [1]=> string(6) "<?php " } [1]=> array(2) { [0]=> int(368) [1]=> string(1) " " } [2]=> string(1) "=" [3]=> array(2) { [0]=> int(368) [1]=> string(1) " " } [4]=> array(2) { [0]=> int(314) [1]=> string(7) "'begin'" } [5]=> string(1) "." [6]=> array(2) { [0]=> int(314) [1]=> string(4) "'en'" } [7]=> string(1) "." [8]=> array(2) { [0]=> int(314) [1]=> string(6) "'eind'" } [9]=> string(1) ";" [10]=> array(2) { [0]=> int(368) [1]=> string(1) " " } [11]=> array(2) { [0]=> int(367) [1]=> string(2) "?>" } }
Output for 4.4.2 - 4.4.9
array(12) { [0]=> array(2) { [0]=> int(354) [1]=> string(6) "<?php " } [1]=> array(2) { [0]=> int(357) [1]=> string(1) " " } [2]=> string(1) "=" [3]=> array(2) { [0]=> int(357) [1]=> string(1) " " } [4]=> array(2) { [0]=> int(313) [1]=> string(7) "'begin'" } [5]=> string(1) "." [6]=> array(2) { [0]=> int(313) [1]=> string(4) "'en'" } [7]=> string(1) "." [8]=> array(2) { [0]=> int(313) [1]=> string(6) "'eind'" } [9]=> string(1) ";" [10]=> array(2) { [0]=> int(357) [1]=> string(1) " " } [11]=> array(2) { [0]=> int(356) [1]=> string(2) "?>" } }
Output for 4.3.0 - 4.4.1
array(12) { [0]=> array(2) { [0]=> int(353) [1]=> string(6) "<?php " } [1]=> array(2) { [0]=> int(356) [1]=> string(1) " " } [2]=> string(1) "=" [3]=> array(2) { [0]=> int(356) [1]=> string(1) " " } [4]=> array(2) { [0]=> int(312) [1]=> string(7) "'begin'" } [5]=> string(1) "." [6]=> array(2) { [0]=> int(312) [1]=> string(4) "'en'" } [7]=> string(1) "." [8]=> array(2) { [0]=> int(312) [1]=> string(6) "'eind'" } [9]=> string(1) ";" [10]=> array(2) { [0]=> int(356) [1]=> string(1) " " } [11]=> array(2) { [0]=> int(355) [1]=> string(2) "?>" } }