3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myxml=<<<XML <students> <student name="hamid" family="bagheri"> <mathematic >18</mathematic> <oop >20</oop> <asp.net>19</asp.net> </student> <student name="omid" family="erfanianfar"> <mathematic >20</mathematic> <oop >20</oop> <asp.net>20</asp.net> </student> </students> XML; $test=simplexml_load_string($myxml); echo $test->student[1][name]; echo " "; echo $test->student[1]->oop; ?>
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected '<<' (T_SL) in /in/BLGgf on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_SL in /in/BLGgf on line 2
Process exited with code 255.

preferences:
175.34 ms | 1395 KiB | 53 Q